LEMPEL-ZIV COMPRESSION

LZ78 dictionary building, phrase tree, and compression ratio vs source entropy
Sliding window (LZ77-style): search buffer | lookahead buffer. Match highlighted in orange.
Compression ratio vs source entropy H(p) for binary iid source. LZ asymptotically achieves entropy.