You need to know the endianness of the data you get, and only when the 
endianness of your system, and the endianness of the encoded bytes do not 
match, you need to swap the bytes of your ints. Or you just assume everything 
is LittleEndian, skip all endianness checks and cast the pointer, because 
endianness is annoying. As long as you don't plan to release on ARM, (android 
ios raspberry) you should be fine. But even ARM has as far as I know options to 
deal with littleEndian.

Reply via email to