Information and compression
Every large physics data set is stored compressed, and every file format you will meet in Part III is built from a few algorithms invented between 1948 and 2016. This part explains them from the physics side.
It begins with entropy (4 Entropy and the limits of compression). Shannon’s measure of information is the same function as the Gibbs entropy of statistical mechanics, and it tells you, before you try anything, how small a file can possibly get. It also explains the most useful practical fact in the whole subject: noise does not compress, so storing digits beyond your instrument’s precision costs real disk space.
Then come the algorithms, in roughly the order they were invented. Huffman coding (5 Huffman coding) gives each symbol a code whose length matches its probability. The Lempel–Ziv methods (6 Dictionaries: LZ77, LZ78 and LZW) replace repeated strings with references to earlier copies. DEFLATE (7 DEFLATE: gzip and zlib) combines the two and has been the world’s default compressor since the early 1990s. bzip2 (8 bzip2 and the Burrows–Wheeler transform) sorts the data first so that it compresses better, LZMA and xz (9 LZMA and xz) look much further back for repeats, and the modern codecs (10 Zstandard, LZ4, Snappy and Brotli) trade a little compression for a great deal of speed.
Each chapter builds a small version of its algorithm in a few lines of R, so you can watch it work on physics data, and then uses the real, fast implementation that R or the arrow package provides. You will never need to implement a compressor yourself. You will need to choose one, and to know what you are trading when you do.