Overview
LZ77 scans input while maintaining a window of recently seen data. When the next bytes match earlier bytes, the encoder emits a distance and length instead of repeating the literal bytes.
Compresses repeated substrings by referring back to earlier bytes in a sliding window.
Compact metadata for implementation and discovery.
LZ77 scans input while maintaining a window of recently seen data. When the next bytes match earlier bytes, the encoder emits a distance and length instead of repeating the literal bytes.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(nw)
Worst
O(nw)
Space
O(w)
token = (offset, length, next_symbol)Represents a repeated phrase by pointing backward into the sliding window.
Show the lookback window and a repeated phrase turning into a reference.
LZ77 requires decoder state to mirror the encoder's sliding window exactly.
What each reference supports for this entry.
Data compression textbook reference for the coding or dictionary method used by LZ77.
Good next jumps from the relationship graph, ranked for useful discovery.
Compression · Core
LZSS is an LZ77-style variant that skips inefficient back-references.
Compare with thisCompression · Core
LZ77 uses sliding-window back-references, while LZ78 grows an explicit phrase dictionary.
Compare with thisCompression · Core
LZ77 uses sliding-window references, while LZW grows a dictionary of phrases.
Compare with thisCompression · Core
Deflate uses LZ77-style backreferences before Huffman coding.
Compare with this