[Zlib-devel] Google's version of zlib code

Greg Roelofs newt at pobox.com
Sun Mar 3 21:35:55 EST 2013


Arjan van de Ven wrote:

> For all the "deflate is dead".... deflate, but more importantly,
> inflate are comparatively cheap in terms of CPU usage (and thus
> power). Yes XZ gets an incrementally better ratio, but only
> incrementally for many cases (esp for files that are not very large)
> and ends up quite a bit more expensive on either side.

Yup, not disagreeing.  Deflate/inflate comprise a nearly perfect "medium-
to-good" compression system.  XZ/LZMA usually do better on the compression
side but at a distinctly higher CPU and memory cost--though not nearly
as high as Zopfli, which is almost as bad as zpipe but without nearly the
same compression benefit.  (However, XZ/LZMA do pretty much kill bzip2--
xz -1 or -2 compresses as well as or better than bzip2 -9 and is equally
fast or faster, and much faster on the decompression side.)

> The google thing shows that there is room on the "get more expensive"
> side, almost to the insane level.
> But there is also room on the "get cheaper" part, and at work we've
> been playing with zlib performance lately (hopefully to go open soon
> once we're a bit further along).

That'll be nice to see.

Still, from a personal perspective, PNG optimizers and (lossless) JPEG
recompressors are much more interesting...

Greg




More information about the Zlib-devel mailing list