Google launches Zopfli, a better zip compressor for static content

Summary:The venerable DEFLATE algorithm just got better thanks to a new open-sourced project from Google, but it is not without its costs.

What is known as ZIP to most of us, is actually the DEFLATE algorithm, and Google has made it slightly better.

The search giant announced Zopli today, which is a new compression algorithm that is compatible with existing DEFLATE decoders, and produces slightly smaller files at the cost of increased CPU load during compression.

Google said that the smaller files produced by Zopfli will result in faster data transmission, lower web page load latencies, and reduced battery use in mobiles.

An example of the cost and benefits can be found in a four page paper authored by Google. In it, four data sources are used: the homepages of 9,148 out of the 10,000 most popular websites; two collections of files known as the Calgary Corpus and the Canterbury Corpus; and enwik8, 100MB of Wikipedia. These files are run through gzip, 7-zip, kzip at maximum compression settings, with Zopfli using its default settings.

At the end of the tests, Zopfli files come out 3.7-8.3 percent smaller, but the computational time needed to compress Zopfli is 81 times more than what gzip needs.

Uncompressing the files is a different story, with Zopfli being the fastest of the tight bunch of results.

Based on these results, Google is recommending Zopfli for a particular use case.

"In the light of the results we presented, we recommend Zopfli for compression of static content, and other content where data transfer or storage costs are more significant than the increase in CPU time," the report suggested. "To our knowledge, Zopfli typically produces the highest compression density of any deflate-compatible algorithm."

Clearly this is not a general use algorithm, but for those designers and developers that are obsessive about shaving a few bytes here and there on images and files, it could be a good alternative.

The fact that a new inflater is not needed, means that Zopfli is ready to use today and that client-side applications need not be updated. A good approach that means that the vast majority of internet users need not know or care of its existence, but it has a chance to be a viable tool for cutting a little bit of cost from traffic-heavy websites.

The CPU intensity/secret sauce in Zopfli is its more exhaustive compression techniques that are "based on iterating entropy modelling and a shortest path search algorithm to find a low bit cost path through the graph of all possible deflate representations".

Zopfli is licensed under the Apache Licence 2.0.

Topics: Google, Web development

About

Chris started his journalistic adventure in 2006 as the Editor of Builder AU after originally joining CBS as a programmer. After a Canadian sojourn, he returned in 2011 as the Editor of TechRepublic Australia, and is now the Australian Editor of ZDNet.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.