FZlib: Zlib in pure ActionScript

Maintained by Marco FUCCI

FZlib is a port of Zlib 1.1.3 in ActionScript.

Based on JZlib, a port of Zlib in Java.

Zlib

Zlib is a "Massively Spiffy Yet Delicately Unobtrusive Compression Library", wrote by Jean-loup Gailly (compression) and Mark Adler (decompression). More informations on the official Website Zlib.net.

Why FZlib?

Flash provides some ways to compress / uncompress data, but functions are basic. You can't change the compression method, for instance, or handle a Zlib stream.

With FZlib, all the power of zlib could be unleashed in ActionScript!

FZlib features

  • No need to say that FZlib can inflate data, which is deflated by zlib (or ByteArray.compress()) and FZlib can generate deflated data, which is acceptable and is inflated by zlib (or ByteArray.uncompress()).

  • FZlib supports every compression level and every flushing mode in zlib.

  • FZlib does not support gzip file handling.

  • FZlib is licensed under BSD style license

  • No breakthrough has been done by developing FZlib. So, if zlib is patent free, FZlib is also not covered by any patents.

Performance issues

Of course, FZlib is less efficent than native flash functions. Use them in priority if you can!

But, I spent some time to optimize the code and it is not so slow: only 4 times slower than Java implementation! (benchmarked against JZlib)

Applications using FZlib

Bibles for FZlib hacking

Credits

FZlib has been developed by Marco Fucci, but he just re-implemented JZlib in pure ActionScript (which is just a re-implemented Zlib in pure Java). So, all the credit should go to the authors aka Jean-loup Gailly and Mark Adler and contributors of zlib, and the JZlib team.

Project hosted by wizhelp.com.