- Home
- Technology
- Streaming
- Compression
How MP3s and JPEGs shrink
How music and pictures lose most of their size, and why you hardly notice what has gone.
The short version
Compression makes a file smaller. Some kinds, like a zip file, can be unpacked to the exact original. Others, like MP3 and JPEG, throw away detail that your ears and eyes are least likely to notice, and cannot get it back. It builds on streaming and compression.
I always thought a smaller file must be worse in every way.
Not always. A good compression removes what you would never have noticed.
Most of a photo is repetition.
Two kinds of compression
Lossless
Nothing lostFinds patterns and writes them more briefly. You get back exactly what you put in. Zip files and PNG pictures.
Lossy
Some lostThrows away detail you will hardly miss. Much smaller, but cannot be undone. MP3, JPEG and most video.
How JPEG does it
A photo is full of repetition: a patch of sky is thousands of nearly identical dots. JPEG splits the picture into small squares, and writes each as a plain pattern, plus a few corrections. It then drops the finest corrections, because the eye is poor at telling tiny changes in brightness and even worse at telling tiny changes in colour.
The more it drops, the smaller the file and the blockier the result.
How MP3 does it
Our ears have limits too. A loud sound makes quieter sounds at similar pitches hard to hear, and we hear almost nothing at the extremes of pitch. An MP3 encoder works out which sounds you would not hear anyway, and leaves them out.
A music CD uses about 1,400 kilobits for every second of sound. A typical MP3 uses 128, about eleven times less, with little loss to most listeners.
How video does it
Video does one more trick. Most of a frame is the same as the one before it, such as a still background. So the file stores one full frame, and then only what has changed in the frames after it.
Note: each time a lossy file is saved again, a little more is lost. For a picture you will edit many times, keep an uncompressed or lossless original.
Key takeaways
- Lossless gives back the exact original.
- Lossy throws away detail you will hardly miss.
- JPEG and MP3 use the limits of eyes and ears.
- Video stores only what changes.
Now you know.
Lossless is exact.
Lossy drops what you won't notice.
Video stores the changes.
Last reviewed 3 Nov 2026