What is Lossy Compression?
Lossy compression reduces file size by permanently discarding some of the original data. Unlike lossless compression, you cannot get the original file back once it has been compressed with a lossy algorithm — some information is gone forever.
The trick is to throw away only the data that humans are unlikely to notice is missing.
Once you save a file with lossy compression, the discarded data is gone for good. Always keep an original copy of important photos, audio, or video before converting to a lossy format.
How Lossy Compression Works
Lossy algorithms take advantage of the limits of human perception. For example:
- For images (JPEG): The human eye is more sensitive to changes in brightness than to changes in colour. JPEG compression removes subtle colour differences while keeping the overall brightness pattern, which the eye barely notices.
- For audio (MP3): The human ear cannot hear very high-pitched sounds well, especially when louder sounds play at the same time. MP3 removes these inaudible sounds.
- For video (H.264): Only the differences between frames are stored, rather than complete images for every frame.
Quality Settings
Most lossy formats let you choose a quality level when saving. A higher quality means less data is removed — the file looks or sounds better, but it is larger.
| Quality Setting | File Size | Quality Loss |
|---|---|---|
| High (90%) | Larger | Barely noticeable |
| Medium (60%) | Medium | Slight blurring/noise |
| Low (20%) | Very small | Obvious artefacts |
For JPEG images, quality loss at high compression appears as blocky patterns called compression artefacts.
Common Lossy Formats
| Format | Type | Use Case |
|---|---|---|
| JPEG | Image | Photographs for web and sharing |
| MP3 | Audio | Music streaming and downloads |
| AAC | Audio | iTunes, Spotify, streaming |
| H.264 / H.265 | Video | YouTube, Netflix, DVDs |
Most music you stream is lossy compressed. A CD-quality song is about 40 MB; the same song as a 320 Kbps MP3 is around 7 MB — nearly 6× smaller, but most people cannot tell the difference on typical speakers or earphones.
Lossy vs Lossless: Choosing the Right One
Use lossy when:
- File size is the priority (streaming, social media, messaging)
- Small quality reductions are acceptable
- Files do not need to be edited further
Use lossless when:
- Perfect quality is essential (archiving, professional work)
- Files will be edited and re-saved multiple times
- The data must be reconstructed exactly (software, text, databases)
Practice Problems
A photographer shoots raw images at 25 MB each and wants to upload 50 photos to a social media website. She converts them to JPEG at medium quality, resulting in 1.5 MB each. Calculate the total space saved.
Show answer
Why is it a bad idea to repeatedly edit and save a JPEG image? What should you use instead if you plan to edit a photo multiple times?