Patent ID: 7233266

Claim:
A data compression device, comprising: a first data compression unit which performs a first data compression process for compressing input data by a dictionary coding method; a second data compression unit which performs a second data compression process for compressing the data compressed by the first data compression unit by a statistical coding method; and a size calculation/determination unit; wherein the first data compression unit searches, by a prefixed search fashion, for longest partial data sequences in an already coded data sequence stored in a dictionary that match data sequences in the input data, and the first data compression unit compresses the data sequences in the input data by replacing each said sequence in the input data with data representing a position of the corresponding longest partial data sequence in the already coded data sequence and data representing a length of the corresponding longest partial data sequence; wherein the size calculation/determination unit calculates: (i) a first amount of output data to be output when the input data is compressed only by the first compression unit, and (ii) a second amount of output data to be output when first output data obtained by the compressing of the input data by the first compression unit is further compressed by the second compression unit, and the size calculation/determination unit determines whether the second amount of output data is larger than the first amount of output data; and wherein when the size calculation/determination unit determines that the second amount of output data is larger than the first amount of output data, the second compression unit refrains from performing the second data compression process.