Helper for reading binary files, used by Shadow-Mapper.