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

JPEGs use Huffman coding to convert a series of bytes (DCT coefficients) into a series of bits. Huffman coding is optimal if each member of the input distribution has a 1/2^n probability (e.g., if 1/2 of the input is 0, you could represent that with just one zero bit).

Arithmetic coding allows fractional probability distributions to be represented. It's usually at least 10% more efficient than Huffman coding.



Just to clarify, both Huffman and arithmetic coding are lossless.

It's other parts of JPEG compression which lead to quality loss, and those parts aren't recompressed.


specifically its how many DCT coefficients you keep i believe




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

Search: