摘要 |
Described above is a two-pass method of compressing a data input stream to create a compressed data output stream. The method includes a step of sequentially examining data elements and strings of data elements of the data input stream in a first compression pass using a sliding window compression scheme to find literal data elements and pairs of length and displacement values. The first compression pass includes: coding the literal data elements and the length values with a first minimum redundancy coding tree; coding the displacement values with a second minimum redundancy coding tree; and adding the coded literal data elements, length values, and displacement values to a single data buffer. The method also includes a second compression pass that is performed whenever the single data buffer reaches a predefined capacity.
|