bertramdev/asset-pipeline — pull request #137 by bryce-gibson (2014-08-07 22:45:47+00:00)
Title: Adding support for a custom gzip command when compressing assets

Adding support for a customGzipCommand config option, allowing a custom external command to be specified for gzipping, rather than using the Java gzip stream.

The background for this is that (Zopfli)[http://code.google.com/p/zopfli/] is a high cost, but higher compression gzip/deflate compatible compressor. Hence using Zopfli during build results in smaller gzipped resources (at a higher execution cost).

There's no Zopfli Java implementation (that I know of) so just calling out to the executable seemed like an easy solution that allows flexibility.
I've only tested on linux with grails.assets.customGzipCommand='zopfli -i1000' - so I can't speak (confidently) to Windows or Mac compatibility, but if the config option isn't set (or is set to false) then the existing code is used anyway.