Overview
LZ78 reads the longest phrase already in the dictionary, emits its dictionary index plus the next symbol, and adds the longer phrase to the dictionary.
Compresses by emitting dictionary references while growing a phrase dictionary from the input stream.
Compact metadata for implementation and discovery.
LZ78 reads the longest phrase already in the dictionary, emits its dictionary index plus the next symbol, and adds the longer phrase to the dictionary.
Quick facts
Runtime and memory behavior at a glance.
Best
O(1)
Average
O(log n)
Worst
O(n)
Space
O(n)
Show emitting dictionary indexes and next symbols while growing phrases on a small dictionary compression example.
LZ78 operates in O(log n) time and O(n) space within the Dictionary Compression family. Often compared with Cuckoo Hashing and Hash-DRBG.
What each reference supports for this entry.
Original LZ78 paper supporting incremental dictionary construction for universal compression.
Open sourceCompression textbook support for LZ78's coding model, decoder behavior, and implementation tradeoffs.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.