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.
- Best way to convert sequence of bytes to uint32 jlindsay
- Re: Best way to convert sequence of bytes to uint32 Stefan_Salewski
- Re: Best way to convert sequence of bytes to uint... jlindsay
- Re: Best way to convert sequence of bytes to ... Stefan_Salewski
- Re: Best way to convert sequence of bytes... jlindsay
- Re: Best way to convert sequence of ... Stefan_Salewski
- Re: Best way to convert sequence... jlindsay
- Re: Best way to convert sequ... Arrrrrrrrr
- Re: Best way to convert sequ... lucian
- Re: Best way to convert sequ... jlindsay
- Re: Best way to convert sequ... Krux02
- Re: Best way to convert sequ... Araq
- Re: Best way to convert sequ... jlindsay
- Re: Best way to convert sequ... Stefan_Salewski
- Re: Best way to convert sequ... jlindsay
- Re: Best way to convert sequ... ManfredLotz
- Re: Best way to convert sequ... Araq
- Re: Best way to convert sequ... jlindsay
