摘要 |
Decompression of Huffman encoded data is obtained by calculating, from a sequence of bits which includes a Huffman code to be decoded, a code length and a code number of the Huffman code to be decoded. The code number is determined based on the rank of the Huffman code when compared to plural other reference Huffman codes with respect to relative probabilities of occurrence. A conversion of the code number into a fixed-length decoded code corresponding to a code which has been encoded is also provided. Corresponding compression of data is obtained by converting a fixed-length code to be encoded into a code number, the code number being determined based on the rank of the Huffman code when compared to plural other reference Huffman codes with respect to relative probabilities of occurrence. By calculation from the code number, a Huffman code to be output and a code length of the Huffman code are then generated.
|