The Coder's Apprentice


“Binary files” is the term used to refer to all files that are not text files. Executable programs are binary files, as are image files, movies, word processor documents, and many other file types. It is not common to use Python to process binary files (usually binary files are not handled by general-purpose programming languages, but by special-purpose programs), but it is possible. This chapter will explain how to deal with binary files.

Title
Introduction
Opening and closing binary files
Reading a binary file
Writing a binary file
Positioning the file pointer
What you learned
Encryption (TODO)
Compression (TODO)
Decompression (TODO)
File compression (TODO)