On Dec 12, 4:30 am, PSN <prakash...@gmail.comwrote:
hello everyone,
Can someone suggest me what would be the best way to build something
like a bitstream class that allows me to do all sorts of bit
operations, same as the bitstream and also whole other custom
operations.
Thanks for your time,
PSN
There's the std::bitset<size_t NumberOfBitsalthough its not a
"stream" but more like a container (set of flags). It does however
have all sorts of overloads for operating on bits.
If its a "byte stream" your after, then std::streambuf could be used
(but be warned if want the bytestream to be portable, streambuf does
not care of things such as endianess).
HTH,
Chris