Skip to content
Property · Format description concepts

Compression lossiness: telling lossy from lossless, with examples

Published Formatory editorial team

Compression lossiness states whether a compression method reproduces the original data exactly on decompression (lossless) or discards information to save space (lossy).

Registries attach a lossiness value to compression types and encodings, which preservation policies then use to choose master and access formats.

Compression always trades something. Lossless methods trade processing time for space and give back every bit. Lossy methods also trade fidelity: they model what a human is unlikely to notice and discard it. Lossiness is the property that records which trade a given compression method makes, and in format registries it usually takes one of two values, lossy or lossless, with uncompressed data recorded as no compression at all.

Where the value belongs

Lossiness describes a compression method, not a container. That sounds pedantic until you look at a real format. A TIFF file can be uncompressed, use LZW, Deflate or PackBits (all lossless) or embed JPEG-compressed strips (lossy). An AVI can hold an uncompressed stream or an MPEG-4 Part 2 stream identified by a FourCC such as XVID. A PDF can mix Flate-compressed text with DCT-compressed photos on one page.

Registry records follow this structure. A compression type record (LZW, Deflate, baseline DCT, the FLAC encoder) carries the lossiness value, and format records link to the compression types they allow. PRONOM’s compression type records, for example, list a lossiness value next to the name and description. When a format permits both modes, the format record itself cannot be labeled lossy or lossless, and a characterization tool has to read the actual encoding inside the file. For TIFF that means reading the Compression tag in each image file directory; for JPEG 2000 it means checking the wavelet transform declared in the codestream header.

Familiar examples

Domain Lossless Lossy
Raster images PNG (Deflate), GIF (LZW), TIFF with LZW JPEG baseline, WebP lossy
Audio FLAC, ALAC, WavPack MP3, AAC, Opus, Vorbis
Video FFV1, lossless H.264 profiles H.264, HEVC, AV1 in normal use
General data ZIP (Deflate), gzip, bzip2, xz not used: arbitrary data must round-trip

GIF’s lossless label hides a catch: the format allows only 256 colors per frame, so converting a photograph to GIF loses information through color reduction even though the LZW step itself loses nothing. The lossiness of compression and the fidelity of the format are related but separate questions. The domain facet of the format (audio, image, video or text) decides what kinds of loss are even possible.

How preservation policy uses it

Repositories commonly keep lossless or uncompressed masters and derive lossy access copies. FFV1 in Matroska has become a frequent choice for digitized video masters, uncompressed or LZW TIFF and lossless JPEG 2000 for digitized images, WAV or FLAC for audio. The lossy derivative can always be regenerated; the master cannot.

Born-digital material breaks the neat rule. A smartphone video arrives as HEVC, a lossy encoding chosen by the camera. Transcoding it to a lossless codec preserves the decoded frames but not the original bitstream, and multiplies the size many times. Many policies therefore keep the original lossy file as the master and treat lossiness as a fact about the object, not a defect to fix.

Audio shows a quieter version of the same problem. An MP3 decoded and re-encoded as AAC for a streaming platform carries the artifacts of both encoders, and no later step can separate them. A record that says only “AAC, lossy” hides that history; a provenance note naming the earlier encoding keeps it visible.

Generation loss is the reason lossiness gets recorded at all. Each lossy re-encode compounds the errors of the previous one, so a workflow that decodes and re-encodes a JPEG at every edit degrades it step by step. Knowing that a file’s compression is lossy tells an archivist to avoid any process that re-encodes it. Further reading: the file format identification guide and the vocabulary index.

Example in RDF

<compressionType rdf:about="https://example.org/compression/lzw">
  <name>LZW</name>
  <lossiness>Lossless</lossiness>
</compressionType>
<compressionType rdf:about="https://example.org/compression/jpeg-baseline-dct">
  <name>JPEG baseline DCT</name>
  <lossiness>Lossy</lossiness>
</compressionType>

Questions about Compression lossiness

What is lossiness in compression?

It is the property that says whether compression throws information away. A lossless method gives back the exact original bytes; a lossy method gives back an approximation that is usually close enough for human eyes or ears but not identical.

Is a format lossy or is a codec lossy?

Strictly, the codec or compression method. TIFF, for example, can hold uncompressed data, LZW or Deflate (lossless) or JPEG (lossy). Records describe the container format and its compression separately so the difference is not lost.

Can a file be converted from lossy to lossless?

It can be saved in a lossless format, but the information already discarded does not come back. A JPEG saved as PNG is a lossless copy of a lossy image: larger, with exactly the same artifacts.

Which formats support both modes?

JPEG 2000 (reversible 5/3 and irreversible 9/7 wavelet transforms), WebP, JPEG XL and HEIF-based formats offer both. The file format alone then does not tell you the lossiness; the encoding parameters inside the file do.

Is visually lossless the same as lossless?

No. 'Visually lossless' is a marketing and engineering term for lossy compression whose errors are hard to see under normal viewing. The data still differs from the original, and a pixel comparison or checksum will show it.

More from Format description concepts

All 16 in this group