3 ms·
That doesn't matter - both systems decompress the losses PNGs before recompressing them.
by danielvf 11y ago
That doesn't matter - both systems decompress the losses PNGs before recompressing them.
- HeyImAlex 11y agoIt does kind of matter, because compression isn't the only form of optimization that can be done. Consider a 32 bit png that is actually bilevel with no transparency. If zopfli just recompresses, PNGOut will still make smaller output because it does bit depth reductions.
- danielvf 11y agoThe zopfliPNG program does do bit depth reduction if that's possible. It even tests to see if a given small image that would be possible to bit depth reduce would actually be smaller by it keeping 32 bit, since the added pallet overhead may cost more than the gain of a smaller pixel storage cost.
- monochromatic 11y agoZopfli is a general purpose compressor. It's not unpacking the png data before compressing it.
- danielvf 11y agoIt does decompress the source PNG and build a new file from the pixels. You can see the source here. https://github.com/google/zopfli/blob/master/src/zopflipng/zopflipng_lib.cc https://github.com/google/zopfli/blob/master/src/zopflipng/z...
- eridius 11y agoThat's why I explicitly mentioned the bit depth, color, and palette reduction. That's stuff that's not related to the specific DEFLATE-compatible encoder used.
- danielvf 11y agoZopfliPNG is not just changing the encoding algorithm - it's using the full suite of ping compression tricks and it is indeed starting from the decompressed pixels. Check the source or try using both programs in a row and compare the size to ZopfliPNG alone. (Why the down vote?)