I could not find a javascript implementation for gzip, but I found this stackoverflow thread basically the same discussion about compression in javascript: JavaScript Gzip implementation
Perhaps you can use some of the suggestions and wrap them with JSNI.
source share