3 ms·
The reason you use specific sizes for types (int8, int16, uint16, etc) is so you know how to read/write them when you move your data between platforms. x86 is
by manv1 4y ago
The reason you use specific sizes for types (int8, int16, uint16, etc) is so you know how to read/write them when you move your data between platforms.
x86 is little endian. ARM apparently can be configured to be either.
In real code there should be readXXX and writeXXX functions that read/write data from disk/network and do the byte swapping in there.
You could also just convert everything to JSON, but you're trading space for complexity/time.
- jesse__ 4y ago> ARM apparently can be configured to be either. That's insane!!! TIL
- programmer_dude 4y agoNot really, it is very easy to do this in hardware.