Add newline to end of files and remove whitespace from end of lines
Add functions to swap endiannes or convert host to big/little endian This code should be very compiler friendly and should be optimized to single bswap instruction on x86.