Compress your life, feel better
What the tech behind the ZIP file can teach us about busyness and calm.
Some scientific models are good, others are great. A good model describes one feature of the natural world well or solves one difficult problem. A great model is multipurpose. It serves as metaphor even where nobody expected it to.
Take one keyword of our current society: busy. In a 2018 Pew survey, 60% of Americans said they sometimes felt ‘too busy to enjoy life’. Between building a career, raising kids, and cleaning the house there seems to be barely enough time to cook or exercise or read or call your mother—even though we know those things are fun and good for you. On the other hand, there’s the adage that ‘if you want something done, ask a busy person’. Some busy people, it seems, can always fit in something small. While their time is scarce, their brains have room. How does that work?
A model from computer science can help us understand. Like us, computers have tasks to complete and to-dos to remember. And like us, they sometimes get overwhelmed. When sending an email over Gmail, there’s a 25 MB limit to the files you can attach. Try to send more, and the system calls in sick. A similar problem hits iPhone users after about two years, when they’ve taken enough puppy photos to exhaust the storage: the phone becomes achingly slow because it doesn’t have space to think.
The solution is compression. Before sending that large attachment, you turn it into a .ZIP archive and voilà, it has shrunk to 11 or 12 MB. This is amazing, if you think about it. Once the receiver unpacks the archive, exactly the same information is presented on their screen, but Gmail had to work a lot less hard for that.
The key is a trick called Huffman coding. It was thought up by David Huffman when he was a grad student at MIT in the 1950s. It was actually a class assignment: what’s the most efficient way to encode a message without loss of information? Huffman’s insight was that you just assign the shortest code to the most frequent character. In English, the ‘a’ and ‘e’ are very common, so you should give them a brief code like ‘000’ or ‘010’. Rarer letters can do with a longer code like ‘10010’, because you won’t use them much anyway.
When you ZIP a file on your computer, the Huffman code is put to work. Take a look at the two paintings below, one by Rothko and one by Bruegel. They have the same dimensions, so if you store them as bitmap files—where each pixel gets a 24-bit color code—they have exactly the same file size. When you ZIP them, however, the Rothko picture becomes a lot smaller. This is because most of the picture consists of two colors. The Huffman code assigns a brief binary code to these colors, storing the entire artwork in a tight package—about 25% of the original file size. Bruegel’s color use is more uniform, statistically speaking, as many colors get about equal light of day. Huffman’s algorithm thus needs to resort to longer codes more often, making the final ZIP file a lot larger—in fact, barely smaller than the bitmap itself.
You can probably see where I’m going with this. Even though both paintings have the same number of pixels, Rothko’s repetition makes his painting easier to compress. The same is true for busyness in daily life. A day filled with many iterations of the same task will be easy to manage, even boring. Your brain will get very efficient at carrying it out, effectively shortening the neural code for your activity. The beautiful thing about memory is that you can even compress tasks across days, building your skillset as you go along. But a day filled with many different, unpredictable tasks does not lend itself to compression. It will feel like the first day of school every time—exhilarating, but equally exhausting.
It is a common misconception that stress is caused by how much work we have to do. Yes, the amount of work matters, but so does how it is organized, how predictable it is, and how much you can control it. Huffman’s compression model captures this insight. If your day is highly compressible, it becomes manageable—and allows you to fit in that one extra job without overheating your cranium.
This post first appeared on 3 Quarks Daily. Want to know more about Huffman coding? I recommend this fun and informative video by Reducible.