utils: add little-endian swap helpers