Boost logo

Boost :

Subject: Re: [boost] Any interest in bitstream class?
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-06-29 07:42:43


Paul Long wrote:
> What do you think?
> Should the bitstream library support multiple endian schemes in the bit
> stream or is big endian enough?

Various communication protocols or files may define the endianess of
data differently. There are even cases like TIFF files which define the
endianess of data in the header. Therefore this type of library should
support different endianesses. It should also probably support switching
them for the same stream multiple times. E.g. some manipulators could be

namespace bs = boost::bitstream;

mystream >> bs::big >> my_int16 >> my_IEEE754_float_32 >> bs::little >>

Of course the endianess of variables on a specific platform should be
taken into account.

It could also support some non-C++ formats like 16-bit half precision or
128-bit quad precision floats. Some typedefs would probably be required
in namespace boost::bitstream.

Best Regards,
Adam Wulkiewicz

Boost list run by bdawes at, gregod at, cpdaniel at, john at