Patent attributes
An encoding and decoding apparatus is provided. In a coding process, a relation between a matching length and a matching-length code is dynamically changed in order to independently switch the matching length that can be expressed by the matching-length code from one value to another. By using a slide window in a data buffer as a dictionary, a character-string searching section searches for a state of matching a character sub-string in input data. A matching-length extension table is used for storing relations between matching lengths and matching-length codes as relations dependent on an internal state stored in an internal-state holding section. A matching-length coding section refers to the matching-length extension table in order to dynamically determine a relation between a matching length and a matching-length code as a relation dependent on an internal state. A character-string coding section generates a code string based on a relative position of a matching character sub-string in the slide window and a matching-length code associated with the matching length of the matching sub-string of characters.