Remove the incorrect file reference comment
Read and write all numbers in little endian.

Implement read and write wrappers that write out the bytes in little endian order regardless of the computer
architecture.
Don't specialize on bits type for sample read and writes.

Use the generic function for all operations.