Binary mode
Opening a file in binary mode hands over the exact bytes. Text mode adds an encoding and line-ending rules, which is only right for text files.
Read by the format
A file whose format you know is read field by field: a header, then sized fields. That is how images, archives, and data files are parsed.