Hacker News new | ask | show | jobs
by randy408 2497 days ago
> Is there a way to disable this multiple-pass approach to get a slightly larger image that is generated faster?

Use png_set_filter() with PNG_NO_FILTERS.

> This one makes it look nearly equivalent to zlib

I don't know how squash is set up, but decompression performance depends on which library created the DEFLATE stream (see https://github.com/zlib-ng/zlib-ng/issues/326#issuecomment-4...).

1 comments

There is no multiple-pass. libpng only tries to guess the right combination of filters, without doing actual compression. It's not always a good guess, but at least it's fast.