Overview
Deflate encodes repeated byte sequences as length-distance pairs and then entropy-codes literals and pairs with Huffman codes. Encoder and decoder process blocks with shared code descriptions.
Compresses data by combining LZ77 backreferences with Huffman-coded symbols.
Compact metadata for implementation and discovery.
Deflate encodes repeated byte sequences as length-distance pairs and then entropy-codes literals and pairs with Huffman codes. Encoder and decoder process blocks with shared code descriptions.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(nw)
Space
O(w)
output[position + i] = output[position - distance + i] for i = 0..length-1Expands an LZ77-style copy token during decompression.
Show repeated text becoming references and then shorter bit codes.
Deflate is lossless; compression ratio depends heavily on match finding and block modeling.
What each reference supports for this entry.
Specification for Deflate blocks, LZ77 references, and Huffman-coded literals/distances.
Open sourceCompression textbook support for Deflate's coding model, decoder behavior, and implementation tradeoffs.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Deflate uses LZ77-style length-distance references.
Deflate entropy-codes literals and match symbols with Huffman codes.