摘要 |
A decoding method comprising the following steps is provided. The mth lookup index for a new lookup table is obtained according to the number of leading 1's in the bit stream. The nth base Huffman code in a simplified Huffman table is obtained according to the mth lookup index. The (n+1) most significant bits (MSB) are obtained from the bit stream according to the nth base Huffman code. A difference is generated according to the (n+1) MSBs in the bit stream and the nth base Huffman code. Whether the difference is less than 0 is checked. If yes, a symbol index is generated according to the difference and the nth base symbol index, and a symbol is obtained according to the symbol index. If no, n is decreased or increased by 1 according to the method being used, and the data in the simplified Huffman table is compared continually.
|