Hacker News new | ask | show | jobs
by ska 419 days ago
>>> In fact, in certain cases it can increase the size instead of compressing.

Fwiw, all (lossless) compression algorithms will increase the size of some inputs.

1 comments

> Fwiw, all (lossless) compression algorithms will increase the size of some inputs.

They rarely meaningfully increase the size though. Typical compression algorithms, when faced with hard to compress sections, can add a handful of bits to wrap them up. Total overhead a fraction of a percent.

When QOI encounters noisy pixels, it has to spend an extra byte per pixel, inflating the file by 33%.

one pretty simple qoi improvement would be a tag to say to store the next n pixels uncompressed. I think there's room in the tags for adding it