Very useful –

 

So, for clarification, under what circumstances will the browser handle decompression of HTTP Compressed data, and when is it necessary to use ByteArray.compress/uncompress?  I’m under the impression that the Flash Player handles communication for the URLStream and Socket class and the browser handles other communications.  Therefore, I would assume that the ByteArray methods would only be needed for URLStream and Socket… Right?

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ted Patrick
Sent: Monday, August 28, 2006 10:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Zlib Compression was Backend Choice...

 

Flash Player 9 supports direct use of zlib compression independent of the browser!!!

 

flash.util.ByteArray.compress

flash.util.ByteArray.uncompress

 

You can retrieve a ByteArray from flash.net.URLStream and flash.net.Socket. These allow you to get a bytearray of data directly from any url or TCP based socket server.

 

Some useful use patterns:

 

ZLIB XML > HTTP > URLStream > ByteArray.uncompress > ByteArray.UTFReadBytes

 

ZLIB SWF/GIF/JPG/PNG > HTTP > URLStream > ByteArray.uncompress > Loader.writeBytes( ByteArray.readBytes )

 

ZLIB AMF > HTTP > URLStream > ByteArray.uncompress > ByteArray.readObject

 

ZLIB XML > TCPSocket > Socket > ByteArray.uncompress > ByteArray.UTFReadBytes

 

ZLIB SWF/GIF/JPG/PNG > TCPSocket > Socket > ByteArray.uncompress > Loader.writeBytes( ByteArray.readBytes )

 

ZLIB AMF > TCPSocket > Socket > ByteArray.uncompress > ByteArray.readObject

 

I explored all these patterns in depth during the evolution of AS3 AVM2 and Flash Player 9.

 

I have some zlib tools in Python and some examples of these patterns. I will clean them up and post them to my blog.

 

Cheers,

 

Ted Patrick

Flex Evangelist

Adobe Systems Incorporated

 

 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tom Lee
Sent: Wednesday, August 23, 2006 11:20 AM
To: flexcoders@yahoogroups.com
Subject: RE: [Junk E-Mail - LOW] [flexcoders] Re: Choice of backend systems - which provides

 

Speaking of that – I’ve always wondered, is the gzip decompression handled by the browser, or by the Flash player?  I’ve assumed it was the browser (HTTP Compression, right?).  That being the case, aren’t there some browsers which don’t have gzip support, or are they all dead?

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to