explicit read sizing, fixup some endian swapping