The price list
shrinks691 → 485
Bytes, before and after.
Module 34 · Compression
Compression replaces what a file repeats with something shorter. Here you pack Larkspur’s price list and pictures for a slow line, and meet the files no method can shrink.
The whole idea in one example
691 → 485
Bytes, before and after.
512 → 864
No repeats to replace.
Both packed by this site’s own pointers-then-short-codes coder, the shape of DEFLATE. The random file is seeded noise made for this site.
How it works
A few bytes fill most of a text
RFC 3629: in UTF-8, the US-ASCII characters (plain English letters, digits and punctuation) take one byte each.
Source, checked 25 October 2026
Repeats become pointers
Jacob Ziv and Abraham Lempel published the pointer method now called LZ77 in 1977, in IEEE Transactions on Information Theory.
Source, checked 25 October 2026
Merge the two lightest piles
David Huffman published his method for building minimum-redundancy codes in the Proceedings of the IRE in 1952.
Source, checked 25 October 2026
Random bytes only grow
RFC 1951: no lossless compression algorithm can compress every possible input data set.
Source, checked 25 October 2026
The story
Larkspur Supply Co.’s catalogue and pictures are too big to send each night; the team finds that compression replaces repeats, so repeated text shrinks and random bytes can’t. You’re on the team that packs it.
Your path



Chapter 3 · done
How does Huffman’s rule give the commonest letters the shortest codes?



Chapter 6 · done
How does throwing detail away make a picture small, and what does it cost?

Chapter 7 · done
Which setting per file fits the budget, with the picture still close enough?
Anyone who has zipped a file or waited on a slow download, and wants to know why some files shrink and others won’t. No maths needed.