Wirebook

Wirebook › Bonus lesson

Why does zipping photos barely make them smaller?

Bonus lesson · about 7 minutes · hands-on · nothing you type leaves your browser

You zip a folder of holiday photos and the zip is almost the same size. You zip a letter and it shrinks a lot. Why? Guess what happens when four very different things go into the same suitcase, then pack them with a real (tiny) compressor and see. Nothing you try leaves your browser.

Step 1: pack the suitcase

A compressor looks for patterns it can fold: a chorus that repeats, or words that keep turning up. It cannot invent a pattern that is not there. For each item, guess how small it will get, then press Pack the suitcase.

Step 2: fold carefully, or leave the jumper behind?

There are two kinds of packing. Lossless folding keeps every detail: unpack it and you get the exact original back, like clothes that were rolled neatly. Lossy packing leaves something behind on purpose — the thick jumper stays home — so the bag gets smaller, but you cannot unpack what you did not pack.

Original picture
After unpacking

Press a button to pack the face and unpack it again.

Why zipping photos barely works

A zip file (and cousins like gzip) is lossless compression. It scans for repeated patterns and writes a short recipe instead of copying every byte. A chorus of “LA LA LA” is a dream: the recipe is “LA, this many times”. Ordinary writing shrinks too, because words such as “the” keep appearing. The original letter is still there when you unpack.

A photo from a camera is usually already packed, as JPEG. That first packing was lossy: the camera threw away detail you are unlikely to notice (tiny colour wobbles, high-frequency sparkle) so the file would fit on the card. What is left looks almost random to a second packer. Zipping it is like sitting on a suitcase that is already vacuum-sealed — there is nothing left to fold, and the zip’s own label can even make the file a few bytes larger.

TV snow is the extreme case: true randomness has no pattern at all. The packed file still needs a small header, so it grows a little.

If a photo is too big to send, do not zip it. Shrink the picture itself: make the long side smaller, pick a lower JPEG quality, or aim for a file size. That is another lossy pass, done on purpose. The sister lesson on blurry video calls shows the same idea in motion — a call throws away wallpaper detail so the face still fits a thin pipe.

A few more honest details

Grown-up twins: Tooltern’s guides on lossless vs lossy compression, why a ZIP can come out larger than the files you put in, gzip vs ZIP, why zipping photos barely makes them smaller and shrinking a whole batch without uploading, plus the in-browser image compressor (it redraws each photo on your device, so hidden location tags are dropped). Sister lesson: why a video call goes blurry on a slow connection.

Words from this lesson

Earn a bonus badge

Get all 4 right to collect the Packing a suitcase bonus badge. Bonus badges are extra: they don't change your stamp count or rank. Wrong answers are fine: just try again.

1. You zip a folder of JPEG holiday photos and the zip is almost the same size. Why?

2. What does lossless compression mean?

3. A photo is too big to email. What should you try first?

4. Why does a letter written in ordinary words shrink when packed?

Try another lesson

  1. 3Can a website get tired?7 min · interactive
  2. 12How does a game remember where you got to?6 min · interactive
  3. 1What happens when you open a web page?6 min · interactive