Lossless Compression

A compression method restoring original data bit-for-bit. Reduces file size with zero quality loss.

Lossless compression produces output that decompresses to bit-for-bit identical data. No information is lost, enabling size reduction without quality sacrifice - foundational wherever data integrity is required.

Major algorithms for images:

Main lossless algorithms used for images
AlgorithmHow it worksWhere it is used
DeflateLZ77 sliding window combined with Huffman codingPNG (implemented via zlib)
LZWDictionary-based: builds the dictionary dynamically and replaces repeated patterns with short codesGIF, TIFF
Run-Length EncodingSimplest technique - "value x count" for consecutive identical valuesBMP
Entropy codingVariable-length codes assigned by frequency. Arithmetic coding achieves near-theoretical limitsJPEG 2000, AVIF lossless

Ratios depend on content. Uniform areas and patterns (screenshots, logos) achieve 50-80% reduction; complex photographs only 10-30%. Significantly lower than lossy compression.

Essential for medical imaging (DICOM), scientific data, legal evidence, and print masters. In editing workflows, lossless intermediates prevent generation loss from repeated saves.

You can compare how each approach affects file size with the image compression tool, which runs entirely in your browser and offers lossless PNG output alongside lossy JPG and WebP.

Related Terms

Related Articles