Extract Decode functions into BytesDecoder class.
Extract class FileReader for FILE reading primitives with byte swapping.