Quick Tip: Compression in Flash
While working on one of my projects where I needed compression for transfered data, I hit some very interesting compression libraries. Also the ByteArray class contains compress method, using zlib algorithm in flash player or multiple algorithms in AIR. At the end I decided to use ByteArray.compress() method for encoding vs. PHP gzuncompress for decoding, what works correctly, fast and smooth.
Here is a list of 3rd party compression libraries and other good stuff:
- AS3 Zip: ActionScript 3 based library for reading and writing zip files
- FZip: FZip is an Actionscript 3 class library to load, modify and create standard ZIP archives.
- ASZip: ActionScript 3 library to generate ZIP files
- LZMA Encoder: AS3 class to compress data using LZMA algorithm.
- LZMA Decoder: A part of the apparat framework.
- GZIP: ActionScript GZIP compression library
- Gzip for HTTPService/URLLoader: Adding Gzip support for Flex/AIR HTTPService/URLLoader
- airxzip: Zip library for ActionScript3 on AIR
If you know some more, please let me know.
Apparat have a LZMA decoder =)
http://code.google.com/p/apparat/source/browse/#hg%2Fapparat-lzma-decoder%2Fsrc%2Fmain%2Fas3%2Fapparat%2Flzma
@focus, thnx, updated
Aparate’s encoder is not and ActionScript library only the decoder is.
I would hope that the fast math that Joa has going would make an encoder faster than ByteArray.compress but who knows. I wish Adobe had a few more options for this type of stuff.
Zip/Unzip library for AIR
thnx airxzip, updated