Lossy compression reduces file size by permanently removing data that the user is unlikely to notice. The original cannot be perfectly reconstructed.
Key features:
- Data is permanently lost. The original file can never be exactly recovered.
- The reduction in size is much greater than with lossless (often 10:1 or higher).
- It is the right choice when small size matters more than perfect fidelity: streaming media, web previews, email attachments, social media images.
How lossy methods reduce data
Lossy methods take advantage of the limits of human perception:
For sound:
- Reduce the sample rate so high frequencies above human hearing are no longer captured.
- Reduce the sample resolution so each sample uses fewer bits.
- Use perceptual encoding that removes sounds the human ear cannot hear (very quiet sounds drowned out by louder ones nearby).
For images:
- Reduce the colour depth so similar shades are merged into one code.
- Reduce the resolution so several adjacent pixels are merged.
- Group visually similar colours together so the image stores fewer distinct colour values.
For video:
- Apply image lossy methods to each frame.
- Store only differences between successive frames rather than each frame separately.
Common lossy formats
- JPEG images (the standard for photographs on the web)
- MP3 audio (the format that made digital music portable in the late 1990s)
- MPEG / H.264 / H.265 video (used by streaming services and DVDs)
- AAC audio (used by Apple, YouTube, Spotify)