摘要 |
The present invention provides a coding apparatus, decoding apparatus, coding-decoding apparatus and corresponding methods which easily generate an adaptive Huffman code. The coding apparatus includes a frequency counting element that counts the frequency of appearance of symbols in input data and a symbol selecting element that selects the data having a frequency larger than a predetermined threshold value as dominant symbol frequency data and transfers the dominant symbol frequency data to a code assigning element. The coding apparatus further includes a fixed code word memory that stores the Huffman codes prepared in advance and transfers them to the code assigning element as fixed code word data. The code assigning element generates the Huffman codes for the dominant symbols and synthesizes the Huffman codes and the fixed code word data stored in the fixed code word memory to obtain the Huffman code as a whole. The obtained Huffman code is stored in a code word memory. Coded data may, likewise, be decoded. In other words, in a decoding apparatus according to the present invention, coded data is input and decoded using generated code words generated based on previously decoded data. Additionally, the invention provides for the coding and decoding of data with a single apparatus.
|