To provide a data compression method etc., a data compression method in conformity with LZ77 code, capable of improving a compression rate and requiring less time for processing of data compression and restoration.
In a data compression method, maximum length matching sequence existing in a coded symbol sequence in which the maximum length matches a symbol sequence to be coded is searched, and coding is performed on the basis of the matching position as the presence position of the maximum length matching sequence and the matching length as the length of the maximum matching sequence. In this method, a code to be generated by the coding consists of a first code containing information about whether or not the values of the matching position and/or the matching length are the same as values at the time of coding of last time and a second code indicating values of the position and/or the matching length not same as the value at the time of coding of last time.
Hayashi Tsunetoku