
29 Jan
2007
29 Jan
'07
7:30 p.m.
On 28/01/07, Donald Bruce Stewart
I've added raw primitives for:
{put,get}Wordhost {put,get}Word16host {put,get}Word32host {put,get}Word64host
which do unaligned, host-sized, host-endian packing of data.
Writing is some 15% faster for Words, a bit less for reading (which is a bit unoptimised at the moment), and a bit less for other types. Needless to say, data serialised this way is only portable to the same architecture.
If the data header stores the alignment/size/endianness, then there's no reason for the data to be unportable. The normal get* instances (not get*host) could suffice for reading. Conrad.