Patent ID: 7898444

Claim:
A decoding method, comprising: obtaining an m th lookup index for a new lookup table according to the number of leading 1's in a bit stream, wherein the m th lookup index is equal to the number of leading 1's in the to-be-decoded bit stream; obtaining an n th base Huffman code from a simplified Huffman table according to the m th lookup index, wherein the n th base Huffman code index indexes the n th base Huffman code in the simplified Huffman table and an n th base symbol index, and the base Huffman code index is equal to the bit length of the n th base Huffman code decreased by 1; obtaining (n+1) most significant bits from the bit stream according to the n th base Huffman code index; generating a difference according to the (n+1) most significant bits and the n th base Huffman code; checking whether the difference is less than 0; generating a symbol index according to the difference and the n th base symbol index if the difference is not less than 0; obtaining a symbol according to the symbol index.