18.104.22.168.22.214.171.124 Using the Compression Algorithm
To use the LZ77 compression algorithm:
Set the coding position to the beginning of the input stream.
Find the longest match in the window for the lookahead buffer.
Output the P,C pair, where P is the pointer to the match in the window, and C is the first byte in the lookahead buffer that does not match.
If the lookahead buffer is not empty, move the coding position (and the window) L+1 bytes forward.
Return to step 2.