General binary file parser.