2 ms·
So, if you throw another >100KB decoder on top of the 1KB decoder, you can beat png (haven’t verified). What’s the point.
by oefrha 4y ago
So, if you throw another >100KB decoder on top of the 1KB decoder, you can beat png (haven’t verified). What’s the point.
- adgjlsfhk1 4y agolz4 is also pretty small https://nigeltao.github.io/blog/2022/qoir.html https://nigeltao.github.io/blog/2022/qoir.html is an implementation of QOI with some tweaks+lz4 and it's still pretty tiny
- masklinn 4y agoAlso I could see it with zstd (which is a lot more than 100k, though very fast indeed) but I’m a bit doubtful about lz4, it’s generally worse than deflate (which png uses) at compression and qoi lacks filtering.
- duskwuff 4y agoQOI's QOI_OP_DIFF and QOI_OP_LUMA opcodes can act like horizontal filtering once the results are fed into a stream compressor. There's nothing to provide vertical filtering, though, which is a pretty huge limitation. I wonder if you'd get better compression using a zigzag scan?
- adgjlsfhk1 4y agothere was some work done to find better scan arrangements. unfortunately, is pretty hard to do so without storing the previous row in memory which has a pretty large effect on speed
- robinsonb5 4y agoI once ported an LZ4 decoder from 68k to my own toy CPU design - the lz4_depack routine weighs in at a whopping 72 bytes. https://github.com/robinsonb5/EightThirtyTwoDemos/blob/master/LZ4/Firmware/lz4.asm https://github.com/robinsonb5/EightThirtyTwoDemos/blob/maste...