Imagine compressing XML files to a tiny
fraction of their original size and decompressing them within flash!
No need, you can do this now. If you gzip a file and send it via post
response (sendAndLoad), the browser will decompress it for you automatically
(as long as the header says it's compressed). I implemented it in an app I
built almost 2 years ago, where all XML data from the server was compressed.
The only downside is that you lose the ability to getBytesLoaded, because
the browser can't uncompress the file until it is completely loaded, and
flash doesn't get any of the file until it is uncompressed.
The uses are endless, especially when you start to think about
compressing files within flash and sending them other places.
The problem there is that the CPU power required to zip any sizeable
amount of data with any reasonably good compression scheme will bring the
Flash player to its knees. And if the data isn't that large, it doesn't
really need to be compressed, does it? I, too, am working on some
compression classes, but I'm pretty busy with other stuff right now and
haven't had time lately to mess with it.
Anyway, making a custom format is out of my league it seems. I tried
working something out with Python but I can't pull it off. Surely the
throngs of people interested in this would figure something out,
unless I'm alone...
I wrote an RLE class a while back, but it's not useful for anything
large, and for smaller stuff the compression isn't that great. And you would
also have to write the same class on the server side if you wanted to use it
anywhere but flash. It's mostly useful for storing large, repetitive blocks
of text for reuse in Flash later.
ryanm
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com