Creator media glossary
Lossless vs. lossy compression: what is the difference?
Short answer
Lossless compression shrinks a file without discarding any data; lossy compression discards data a viewer is unlikely to notice, for a much smaller file.
Key takeaways
- Lossless compression restores every bit exactly; lossy compression discards detail for much smaller files.
- Use lossless for documents, code, editing and archives; lossy for sharing and streaming.
- Lossy losses add up with every re-encode; converting lossy to lossless cannot restore them.
- Platforms always deliver lossy, so upload at high quality and let them compress once.
Lossless vs. lossy compression explained
PNG and FLAC are lossless - decompress them and you get back exactly the original data, bit for bit. JPEG, MP3 and most video codecs are lossy - they permanently discard information to hit a target file size, and that loss compounds if the same file is repeatedly re-compressed.
Neither is universally "better": lossless is for masters, archives and anything that will be edited further; lossy is for final delivery, where the file needs to be small and the original is kept safe elsewhere in case another edit is needed.
How lossless compression works
Lossless methods find redundancy and describe it more briefly, in a way that can be reversed exactly:
- Run-length encoding: "200 white pixels" instead of 200 separate values.
- Dictionary coding (LZ77 and DEFLATE, used by ZIP and PNG): repeated sequences are replaced with a reference to an earlier copy.
- Prediction: FLAC and PNG filters predict each sample from the previous ones and store only the small error.
- Entropy coding (Huffman, arithmetic): common symbols get shorter codes.
Typical gains are modest: FLAC files are often around half to two thirds the size of the WAV, and text compresses to roughly a quarter to a third.
How lossy compression works
Lossy methods model human perception and discard what we are least likely to notice. Images and video convert to frequencies and round away fine detail, and store color at lower resolution than brightness. Audio codecs use psychoacoustics: quiet sounds masked by louder ones at nearby frequencies are dropped. Ratios of 10:1 for photos and well over 100:1 for video are routine, which is what makes streaming possible.
Generation loss
Each lossy encode starts from the previous result and throws away a little more, so quality drops with every save, edit and re-upload. A meme screenshot of a screenshot shows it clearly. Converting to a lossless format does not help: it freezes the damage in a bigger file. Keep a lossless or high-quality master and make lossy copies from it.
Common formats by compression type
| Format | Media | Compression |
|---|---|---|
| PNG | Image | Lossless |
| JPEG | Image | Lossy |
| WebP | Image | Lossy or lossless |
| GIF | Image / animation | Lossless, but limited to 256 colors per frame |
| H.264, HEVC, VP9, AV1 | Video | Lossy in normal use |
| ProRes | Video | Lossy, but high enough quality for editing |
| FLAC | Audio | Lossless |
| WAV (PCM) | Audio | Uncompressed |
| AAC, MP3, Opus | Audio | Lossy |
Settings that look lossless
| Format | Setting where most people see no difference | Size vs lossless |
|---|---|---|
| JPEG | Quality 90 or higher | A small fraction of a PNG for photos |
| AAC | 256 kbps stereo | About a quarter to a third of FLAC |
| MP3 | 320 kbps | About a third of FLAC |
| H.264 (x264) | CRF 18 | A tiny fraction of uncompressed video |
| ProRes 422 HQ | Its only setting | About 1/6 of uncompressed 10-bit 4:2:2 (Apple) |
Rough figures; detail-heavy content needs more. "Visually lossless" still loses data, so keep a lossless or original master.
Lossless vs lossy at a glance
| Lossless | Lossy | |
|---|---|---|
| Reversible | Exactly | No |
| Typical size reduction | 2:1 to 4:1 | 10:1 to 100:1 and more |
| Quality after re-saving | Unchanged | Drops each generation |
| Speed | Fast to decode | Fast to decode, encoders can be slow |
| Use for | Text, code, archives, editing masters, graphics | Delivery: streaming, uploads, web images |
| Examples | ZIP, PNG, FLAC, ALAC, FFV1 | JPEG, WebP (lossy), MP3, AAC, H.264, HEVC, AV1 |
Which one to use
- Documents, code, spreadsheets and software: always lossless. One wrong bit can break them.
- Recording and editing: lossless or visually lossless (ProRes, DNxHR, FLAC, WAV), so edits do not stack losses.
- Archiving originals: lossless, or the camera original as recorded.
- Sharing and uploading: lossy, at the quality the platform recommends; it will re-encode lossy anyway.
- Screenshots and logos for the web: lossless PNG or lossless WebP.
Frequently asked questions
What is the difference between lossless and lossy compression?
Lossless compression shrinks a file and restores it exactly (PNG, FLAC, ZIP). Lossy compression throws away detail you are unlikely to notice to get much smaller files (JPEG, H.264, AAC, MP3).
Are social media uploads lossy?
Yes. Platforms re-encode uploads with lossy codecs, so even a lossless upload is delivered lossy. The point of a high-quality upload is to give that re-encode the best possible starting point.
Does converting lossy to lossless restore quality?
No. Converting a JPEG to PNG makes a bigger file with exactly the same lost detail.
What does "visually lossless" mean?
Lossy compression tuned so well that differences are not visible in normal viewing, such as ProRes 422 HQ. It is still lossy, so many generations eventually show.
Is ZIP lossless?
Yes. ZIP uses DEFLATE, the same lossless method as PNG. Zipping JPEGs or MP4s saves almost nothing, because they are already compressed.
Let Koldflux pick the settings
Koldflux chooses the codec, container and bitrate for each platform when it exports.
Free tools that use this
Sources and how we checked
- MDN: Image file type and format guide (checked 2026-10-05)
- MDN: Web video codec guide (checked 2026-10-05)
- MDN: Web audio codec guide (checked 2026-10-06)
Reviewed October 6, 2026 by the Koldflux team. Definitions follow the specifications and platform documentation linked above; platform tables come from the same registry the Koldflux tools use.