Patent ID: 7167115

Claim:
A method for compressing an input data stream, the method comprising: reading a string and a character from the input data stream; determining if a code corresponding to the string plus the character is contained in a first dictionary or a second dictionary; in response to determining that a code corresponding to the string plus the character is in the first or second dictionaries, adding a next input character from the input data stream to the string and repeating the determining operation; in response to determining that a code corresponding to the string is not in the first or second dictionaries, determining whether the string contains only one character, outputting the character if the string contains only one character, and outputting a new code for the string if the string contains more than one character, determining whether the string plus the next input character comprises a two character word, adding a new code for the string plus the next input character to the first dictionary in response to determining that the string plus the character comprises a two character word, adding a new code for the string plus the character to the second dictionary in response to determining that the string plus the character comprises a word having more than two characters, and setting the string equal to the character.