Patent ID: 7860328

Claim:
A compression processing apparatus compressing input data and outputting compressed data, comprising: a dividing unit dividing a plurality of elements included in a population having said input data into a plurality of subsets by using a feature of each element; a coding unit performing Huffman coding on coding target data for each subset by using a plurality of Huffman coding tables provided corresponding to said plurality of subsets, and outputting said compressed data; a table retaining unit retaining first and second coding tables each having a plurality of Huffman codes; and an updating unit updating one coding table which is not used for the Huffman coding on said input data, in said first and second coding tables, depending on a frequency of occurrence of said coding target data so that the coding target data with a highest frequency of occurrence is converted into a shortest Huffman code, wherein when a compression ratio of said compressed data is equal to or less than a threshold, said coding unit performs the Huffman coding on said coding target data for said each subset while creating said plurality of Huffman coding tables, based on the other coding table in said first and second coding tables, and when said compression ratio becomes larger than said threshold, said coding unit performs the Huffman coding on said coding target data for said each subset while creating said plurality of Huffman coding tables, based on the one coding table updated by said updating unit.