HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sbrki

no profile record

comments

sbrki
·5년 전·discuss
Very nice.

Regarding the comments about complexity of existing formats - I agree, with the exception of PNG. In terms of complexity, QOI is very similar to PNG filtering phases, i.e. when you strip primary compression phase (Huffman coding) from PNG.

Also, I admire how the author combined a lot of common and cool tricks into QOI:

- Block tags form a sort of a prefix code, making it easy to differentiate block types with differing sizes

- Look-back array is used (common trick from LZW family)

- Delta-coding is used when storing pixel diffs

- In the end, if nothing else works, full pixel value is written

Also, the fact that everything is byte aligned is very appreciated.

This is a breath of fresh air and really impressive how good performance (both processing and size reduction) this gets with so little (very readable!) C.