Re: Single-bit I/O

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance





Kevin C. schreef:
> Quick, stupid question. Does C/C++ have any mechanisms for handling
> memory at the bit level, other than using 8-bit masks? So for example
> if I was implementing a compression algorithm like Huffman, would I
> have to do a lot of bit-byte conversion?

std::vector<bool> is space-optimized. That of course means you can't
get a bool* to the buffer, but it's iterator works like a "bit pointer"

HTH,
Michiel Salters

.



Relevant Pages

  • Re: Single-bit I/O
    ... > Kevin C. schreef: ... >> memory at the bit level, other than using 8-bit masks? ... >> if I was implementing a compression algorithm like Huffman, ...
    (microsoft.public.vc.language)
  • Re: Single-bit I/O
    ... > memory at the bit level, other than using 8-bit masks? ... > if I was implementing a compression algorithm like Huffman, ... its because the cpu also understands the code. ...
    (microsoft.public.vc.language)
  • Re: Single-bit I/O
    ... > if I was implementing a compression algorithm like Huffman, ... For algorithms such as Huffman coding/decoding, ... using shifts and masks. ...
    (microsoft.public.vc.language)
  • Re: Entropy
    ... but at the time the algo was rather slow. ... I have a big area of memory, showing the current symbol orders for every ... context, the index is output, and the symbol is moved to the front of the ... I don't want to take into consideration the space required for huffman ...
    (comp.compression)
  • Re: foreach vs for
    ... Huffman encoding is a compression algorithm, used in GIF files if I ... punctuation that isn't really pulling its weight, ...
    (perl.beginners)