LZ77 Compression — Sliding Window
Watch the sliding window scan the input character by character.
The search buffer holds already-encoded data;
the lookahead buffer holds what's next.
Each step emits a (offset, length, next-char) token.