I really needs more benchmarks, especially decompression time.
Also the sizes are interesting for very small images, but for
real images, there are maybe better lossy variants:
It's a lossless format optimized for file size rather than decompression speed; the README seems clear enough. Made by a pixel art game dev, for compressing sprites in pixel art games, so I assume it fits a useful niche.
I don't see any hassle, really. It's just another image format: good for some use cases, bad for others. No one file format is perfect. It was interesting enough for me to give it a couple of hours to implement a cli and add support to my pixel app.
So from what I understand, it predicts the next pixel by looking at the two previous pixels and counting what has appeared in that context earlier in the image. I'm not 100% sure, but I think it processes the pixels line by line.
It then encodes with arithmetic encoding. Along with the palette, I think that does most of the heavy lifting in the compression, an adaptive model looking at just two pixels of context shouldn't make especially good predictions. PNG (sort of) looks at 4, the three above and the one to the left.
I've put together a quick CLI for macOS and a very naïve benchmarking suite to see what the gains are like. Compared to optimised PNG, it's worse most of the time but the interesting thing is when it is better. I'm not sure there's a hard and fast rule, at least not that I've found so far.
https://nigeltao.github.io/blog/2021/fastest-safest-png-deco...
PNG decoding seems to be fast enough:
Anyway, PEP is interesting!It then encodes with arithmetic encoding. Along with the palette, I think that does most of the heavy lifting in the compression, an adaptive model looking at just two pixels of context shouldn't make especially good predictions. PNG (sort of) looks at 4, the three above and the one to the left.
Also I posted some results earlier today: https://twitter.com/gingerbeardman/status/195993422257285161...
And I already added support to my pixel art app, Dottie, just for kicks https://twitter.com/gingerbeardman/status/195998796230676915...
</philosoraptor>