Boost logo

Boost :

Subject: Re: [boost] How do folks test serialization code?
From: John Maddock (john_at_[hidden])
Date: 2013-08-05 07:54:50

>> But since I know the internals of the classes are platform specific,
>> I've had to come up with a serialization format (for cpp_int for
>> example) which is platform independent. Or at least I think it is. I
> I am interested in learning more about how this format for cpp_int is.
> I maintain an encoding format [1], which I would like to extend with
> variable-length integers.

I've just committed the code so you can try for yourself, but basically
rather than storing a sequence of "limbs" (which may vary in size from one
platform/compiler to another), it stores a sequence of bytes instead. The
bytes are extracted using high level operations (shifts and bitmasks) so
there's no issue with endianness etc.

That's what I hope anyway ;-)


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