Boost logo

Boost :

Subject: Re: [boost] Any interest in bitstream class?
From: Paul Long (plong_at_[hidden])
Date: 2013-06-28 14:03:40


On 6/28/2013 9:33 AM, Klaim - Joël Lamotte wrote:
> I would be interested in such a stream type.
> However, only if there is an optional way to force the endianess (via
> implicit conversion)

There are two endianesses (?) at play here--in the bit stream and on the
platform. To which are you referring? If the latter, there isn't
anything to worry about because ibitstream makes no assumptions about
the endianess of the platform, but it does assume network order, or big
endian, in the bit stream. If you are concerned about the bit-stream
endianess, we'd need to work out the specifics, because I don't think
the semantics would be obvious for other endians. For example, can the
bit endianess be specified separate from the byte endianess? (Hmm...
that's reminds me--it currently supports STL bitsets but I don't think
it supports C bitfields. I'll have to look into that.) Also, what
bit-stream endianesses should bitstream support--big, little, mixed, middle?

> or any other feature allowing easy serialization on
> multiple platforms.

Like I said, it should already behave the same on all platforms, but
maybe I'm missing something. What is your specific concern?

Paul


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk