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 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.”
- 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.”
You can leave a comment, or trackback from your own site.
6 Comments so far
Add your comment
Comment notes
Please keep comments on topic. Comments that are inappropriate or offensive will be edited or removed.
Paragraphs and line breaks are automatically converted to HTML, and quotation marks are converted to “smart” quotes.
The following XHTML tags can be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> . All others will be removed.
February 22nd, 2008 at 9:26 pm
Danny Patterson is reported to have said:
February 23rd, 2008 at 3:45 am
Central Standard Tech is reported to have said:
February 25th, 2008 at 1:56 am
Adobe - Developer Center : Compressing files and data is reported to have said:
June 20th, 2008 at 5:41 pm
Extending the Flex HTTP Service to Support Binary Data is reported to have said:
July 17th, 2008 at 1:18 pm
Alex is reported to have said:
Hi Paul,
I was pretty excited to find your GZIP library and was going to use it in my project. But then I discovered that it doesn’t work with Flex. Flex’s implementation of ByteArray.compress() is different than AIR’s and supports only default zlib compression. Any idea why are they different? Will Flex ever support gzip?
Thanks,
Alex
July 17th, 2008 at 2:46 pm
Paul is reported to have said:
@Alex:
Just to clarify, the library does work with Flex (I’ve only ever used it with Flex) as long as your Flex app runs in AIR. However, the library doesn’t work in Flash Player 9, so it doesn’t work in a Flex app that runs in the browser (or a non-Flex app that runs in the browser, for that matter).
The additional functionality (compression using the Deflate algorithm rather than zlib) was added in AIR — as you’ve noted, Flash Player only supports zlib.
The good news is that the functionality that was added in AIR has been rolled back into Flash Player for the next release (Flash Player “Astro”), which is currently available as a public beta. I haven’t updated the library to support that new functionality, obviously, but I plan to do so soon.