LZ77 uses a sliding window to find repeated patterns. It encodes matches as (offset, length, next char) tuples.
The search buffer looks backward for matches, while the lookahead buffer scans forward for the longest match.