Lossy vs Lossless Compression
How lossy and lossless compression work, where each is appropriate and how to choose the right setting for photos, audio and documents.
Compression makes files smaller by encoding information more efficiently. Lossless compression reduces size without losing any original data, so the file can be restored exactly. Lossy compression removes information that is judged less noticeable, achieving much smaller files at the cost of permanent change.
Understanding the difference helps you choose the right format for archives, final delivery, editing and sharing.
| Option | Best for | Strengths | Limits |
|---|---|---|---|
| Lossless compression | Archives, source files, text and important documents | Perfect restoration, safe for repeated editing, ideal for masters | Files remain larger, and gains are modest for photos and video |
| Lossy compression | Web photos, streaming audio and final video distribution | Very small files, good perceived quality at moderate settings | Quality cannot be recovered, and repeated re-saving degrades results |
| Mixed approach | Professional workflows with masters and delivery copies | Keeps quality where it matters and saves space for distribution | Requires managing two sets of files |
When quality loss matters
Lossy compression is fine when the viewer cannot easily notice the difference, such as a streamed song or a web photograph at a sensible size. It becomes a problem during editing, because each save adds further changes. Work from lossless originals and export lossy copies at the end.
Text, code and databases must always be stored losslessly, because even a small change can make a file unusable.
Choosing quality settings
Set lossy quality by testing the output at the size it will be viewed. Compare fine details such as text, hair and gradients, since these show artefacts first. Use higher settings for work you may print or enlarge and lower settings for quick web previews.
Verdict
Keep masters lossless for editing and archiving. Use lossy compression for delivery where file size matters and quality stays acceptable at the viewing size, and never compress text or data files with lossy methods.
Frequently asked questions
- Is ZIP lossless?
- Yes. ZIP and similar archive formats are lossless, so extracted files match the originals exactly.
- Can I recover lost quality?
- No. Once lossy compression removes information, it cannot be restored. Keep the original file if you may need better quality later.
- Does lossless always mean big files?
- Not always, but lossless files are usually larger than lossy versions of the same content. Modern lossless methods still reduce size significantly for many file types.