3 ms·
In a serialization format you should explicitly define the endianness to be used and then convert to and from it explicitly in the serialize/deserialize code. S
by pedrocr 7y ago
In a serialization format you should explicitly define the endianness to be used and then convert to and from it explicitly in the serialize/deserialize code. So memcpy is wrong but the grandparent point still stands. Defining a serialization format for float/double that's just 4/8 bytes in little-endian might be a better idea than the mess we sometimes have right now because IEE-754 is more of a standard than anything else in the space.