摘要 |
The disclosed compressor utilizes a plurality of prefix tables corresponding to respective prefix codes. A string is stored by storing the code associated with the string in a prefix table corresponding to the code of the string prefix at a prefix table location corresponding to the extension character of the string. The input data character stream is searched by comparing the input stream to the stored strings to determine the longest match therewith. The code associated with the longest match is outputted so as to provide the output stream of compressed codes. The stored strings are updated by inserting an extended string into the prefix tables, the extended string comprising the longest match extended by the next data character in the input stream following the longest match, the extended string being stored in the prefix table corresponding to the code of the longest match, a code being assigned to the extended string. A code is deleted from a prefix table for reassignment to an extended string to be inserted when further codes are unavailable for assignment. A code is selected for reassignment when the prefix table corresponding to the code is empty or has not been established.
|