| [2] | 1 | 1. Compression algorithm (deflate)
|
|---|
| 2 |
|
|---|
| 3 | The deflation algorithm used by gzip (also zip and zlib) is a variation of
|
|---|
| 4 | LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
|
|---|
| 5 | the input data. The second occurrence of a string is replaced by a
|
|---|
| 6 | pointer to the previous string, in the form of a pair (distance,
|
|---|
| 7 | length). Distances are limited to 32K bytes, and lengths are limited
|
|---|
| 8 | to 258 bytes. When a string does not occur anywhere in the previous
|
|---|
| 9 | 32K bytes, it is emitted as a sequence of literal bytes. (In this
|
|---|
| 10 | description, `string' must be taken as an arbitrary sequence of bytes,
|
|---|
| |
|---|