Paul Robertson's words, punctuated

Thoughts on development, user-centered design, code, etc. by Paul Robertson

ActionScript GZIP compression library

This is an ActionScript library for encoding (compressing and uncompressing) files using the GZIP compressed file format. The source code for the ActionScript GZIP encoding library is hosted on Google Code; the code is available under the MIT license.

Note: version .2 and previous were licensed under the Mozilla Public License, v. 1.1.

Where it’s been used:

  • This project is incorporated into an article I wrote for the Adobe Developer Center titled ”Compressing files and data.” In that article I explain some of the background concepts around compression formats, and the article also includes a simple app that provides a UI for compressing and decompressing files that wraps this library.
  • Danny Patterson uses the library to decompress GZIP-encoded data (SOAP web service calls) that are sent compressed from a web server, as he describes in his article ”GZIP-Encoded HTTP Response in Adobe AIR.”
  • Mark Lynch used the library, together with Anirudh’s code (described below) to create a drop-in GZIP-supporting replacement for the Flex HTTPService component that “does the right thing” and detects whether the content is GZIP encoded, decoding it if it is. This was on my list of planned future work for this project, so I’m glad he saved me the trouble!
  • Anirudh Sasikumar wrote an extension of the Flex HTTP Service that provides support for gzipped HTTP responses, (in many ways a simplification of Danny’s work) as he describes in his post ”Extending the Flex HTTP Service to Support Binary Data.”