Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The technique is known as "Canonical Huffman" and is quite elegant indeed. It is best understood by considering the codes as binary numbers, then the tree structure naturally appears. There's a very short algorithm to generate the appropriate encoding and decoding tables in the JPEG standard and it involves not much more than shifts and adds.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: