attempt to get the type of files using magic number.
confused by big-endian and little-endian