News for hackers. Stuff that matters.
Re:What Is Huffman Coding? by Dylan16807 on Monday February 22, 2021 @02:51AM (#26221909)
You ask why it should work differently but then give a good reason why it should work differently: sometimes splitting by bytes is not the best unit.

And it actually does often work differently for PNG! PNG has a handful of preprocessing options for the pixels. So in filter mode 2, for example, deflate is encoding the difference between each pixel and the pixel above it. More or less.

Re:What Is Huffman Coding? by twic on Monday February 22, 2021 @05:37AM (#26222933)
But you still apply Huffman coding to the bytes after filtering.

I think this is true even when using 16 bits per sample, but i'm not sure.

From what i remember, in gzip, Huffman coding is applied to the offsets of repeated blocks, which are not single bytes.