Why it matters

LZ78 is dictionary compression foundation. Understanding shapes compression.

Advertisement

The architecture

Build dictionary incrementally.

Emit (idx, char) referencing dictionary + new char.

Dictionary grows.

LZ78 encoding flowBuild dictionaryincrementalEmit tuple(idx, char)Dictionary growswith each outputZiv + Lempel 1978; LZW = LZ78 variant used in GIF + TIFF + compress
LZ78.
Advertisement

How it works end to end

Ziv + Lempel 1978.

LZW (Welch) variant.

GIF + TIFF + compress use LZW.