How LZ77 Data Compression Works
Too Long; Didn't Read
LZ77, a lossless data-compression algorithm, was created by Lempel and Ziviv in 1977. The algorithm is widely spread in our current systems since, for instance, ZIP and GZIP are based on it. The process of compression can be divided in 3 steps:Find the longest match of a string that starts at the current position with a pattern available in the search buffer. Move the cursor l+1 positions to the right and find ourselves in the character ‘b’. After this (non-)match, we find the character 'a' so we need to move 2 positions (o = 2) and read 2 characters (l)