Hi,

I am doing the same thing with much bigger envelops.
At the server I use a Apache2 module mod_deflate that
compresses all XML using zlib before sending it back
to the client. The client-browser will decompress and
pass the XML back to your application. Most browsers
do support this server-side compression and notify the
web-server by adding an appropriate HTTP-header to
your request. So the only this you have to do is
enable compression at your web-server.

The other way around, when sending large XML envelops
to the server, you can compress the XML by converting
the XML to a ByteArray, compressing it and sending it
to the server. You will hane to set the contentType to
"application/octet-stream" or something similar. Then,
server-side I decompress it using zlib (in C++/Boost)
to get to the XML. An alternative way is to let your
web-server decompress it, but I didn't get this to
work and gave up on it.

My experience with compressing XML is very good. The
cost of decompressing/compressing does not out way the
network overhead. I timed compression in Flex with
getTimer() and it only costs a few msec for up to
500k. Small envelopes (5k) can not even be timed with
getTimer(), it shows 0 msec all the time.

Good luck,
Andrej



--- "M.Javed" <[EMAIL PROTECTED]> wrote:

> Hi all,
>   I have an application which calls a .NET
> webservice for data periodically, lets say, every 5
> seconds. The WebService in return sends an XML back
> to the Flex Application which process it further for
> display. As you can see the network in this scenario
> can b a bottle neck in case of slow internet
> connections, currently the XML sent by the
> WebService to the Flex Application is of size around
> 5kb. I want it to be reduced by implementing some
> kind of compression if there is any support
> available. If anyone can give any idea in this
> regard, it will be a great help.
>   Thanks in advance, 
>    
>   regards,
>   -Javed
> 
>        
> ---------------------------------
> Looking for last minute shopping deals?  Find them
> fast with Yahoo! Search.



      __________________________________________________________
Sent from Yahoo! Mail.
The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html

Reply via email to