摘要 |
Disclosed is a method and system for data compression. In a preferred embodiment, an input stream of data bytes are compressed into an encoded stream using an LZ77-based scheme. The preferred method searches for a matching sequence of already processed data bytes that is identical to a current sequence of bytes. Sequences of literals (bytes not forming part of a matching sequence) or match codes (encoded matching sequences) are identified by count values indicating the number of literals or match codes in the sequence. Preferably, the encoded stream is transmitted from a first computer to a second computer, where the encoded stream is decompressed. The method uses matching circular history buffers for compression and decompression, the history buffers being synchronized using a coherency byte included with each frame of encoded data transmitted. If an encoded frame is not received by the decompression device , the decompression device transmits a flush request to the compression device. Th e compression device flushes its history buffer in response to the flush request, the flushing step making the previously processed bytes stored in the history buffer incapable of becoming part of a matching sequence. The compression device includes in the coherency code of the next encoded frame a control code indicating whether a flush request has been received by the compression device.
|