Hi, 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 provided: namespace bs = boost::bitstream; mystream >> bs::big >> my_int16 >> my_IEEE754_float_32 >> bs::little >> other_int16; 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