I'm trying to write an adobe air application that compresses multiple files into one archive and then uploads that archive to a web server. Currently I'm using the fzip library. The problem is fzip requires me to load the entire file into memory before serializing it to the zip format. I'm looking for an example of doing streaming file compression in air such that I can manage the amount of memory my app uses at any given time.
+1
A:
I believe you'd have to write your own compressor from scratch. The compress() & uncompress() methods included in the AIR API (upon which fzip depends) only operate on a complete ByteArray.
You might consider modifying the fzip source to "store" each file in the archive rather than deflating. You wouldn't get any compression, but could then modify fzip to stream from the file source without pre-loading the entire file for compression.
John Lemberger
2009-08-13 18:00:14