making bbPress (and WordPress) work better!

zopfli gzip compressor – binary for Windows

Google recently opensourced an interesting little project in C called ZOPFLI to try to get the most compression possible out of gzip which is one of the only universal compression available in browsers.

This is useful for things that are compressed once and served many times, for example jquery, stylesheets, etc. But in my testing, Zopfli only does very slightly better than 7zip’s ultra gzip compression set at mx9, and zopfli takes much much longer. It’s an interesting experiment but perhaps pointless.

If you want to try it, you can get it at:

https://code.google.com/p/zopfli/

git clone https://zopfli.googlecode.com/git/

Alternately if you are on windows, you can use MinGW to easily compile it into a command line utility that works exactly like it’s linux counterpart. Note that you may have to fix your mingw install by copying a few files or changing your path.

Or if you are lazy and feel you can trust me, here is a zopfli windows binary

Comparison:

92629 bytes  jquery-1.9.1.min.js  
31783 bytes  7z.exe -mx9 -tgzip a "jquery-1.9.1.min.js.gz" "jquery-1.9.1.min.js"
31688 bytes  zopfli.exe -v --i1000 "jquery-1.9.1.min.js"

Note this is only a comparison of gzip/deflate so even if bzip or xz is 10k smaller, it's pointless because browsers cannot natively decode that.

zopfli also took a VERY long time compared to 7zip

Before you argue that 100 bytes saved served many thousands of times is significant, remember that a TCP/IP packet is rounded typically to 1500 bytes or so. 100 bytes is meaningless unless it saves an extra packet, which it will probably not.

One response

  1. “100 bytes is meaningless unless it saves an extra packet, which it will probably not.”

    Or if you are Google and happen to serve a gazillion files per day. Think of all the sites hot linking http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js. I don’t know how many times a day that gets requested, I’d guess it to be a fairly large number though. If they can make that smaller via a one time compression process, then that will probably multiply out to a reasonable win.

    March 2, 2013 at 6:13 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 45 other followers