5 Aug
2013
5 Aug
'13
11:54 a.m.
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 ;-) John.