Formats

What's the difference between lossless and lossy compression?

Two approaches to compression, one trade-off: perfect quality vs smaller files.

Quick Answer

Lossless compression preserves 100% of the original data. You can decompress the file and get back exactly what you started with. The trade-off is modest file size savings (typically 5-15% for images).

Lossy compression permanently removes data that humans are unlikely to notice. In exchange, you get dramatically smaller files (50-80% reduction for images). The quality loss is usually imperceptible, but the process is irreversible.

AttributeLosslessLossy
Data Integrity100% preservedSome data removed
Typical Savings5-15%50-80%
Reversible?YesNo
Best ForLogos, icons, archivalPhotos, web images

How Compress.FAST Implements Both

PNG Compressor

Our PNG compressor offers both modes:

  • Lossy mode (default): Uses libimagequant, the same technology behind TinyPNG. Achieves 50-80% reduction by intelligently reducing to a 256-color palette.
  • Lossless mode: Uses oxipng, a Rust-based PNG optimizer. Achieves 5-15% reduction with pixel-perfect output.

Toggle between modes using the "Lossless" switch in the options panel.

JPG Compressor

JPG is inherently a lossy format. Our JPG compressor uses MozJPEG with trellis quantization for optimal quality-to-size ratio.

Which Should You Use?

  • Logos, icons, screenshots: Start with lossy mode (it auto-detects graphics and keeps edges crisp). If you see artifacts, switch to lossless.
  • Photos for web: Lossy is almost always the right choice. The file size difference is significant.
  • Master files for archival: Use lossless, or keep the original and only export lossy versions.

Want the full technical deep-dive?

We've written a comprehensive guide covering the algorithms (DCT, chroma subsampling, libimagequant, oxipng), generational loss, format comparisons, and when to choose each approach.

Read the full guide: Lossless and Lossy Compression