> For background, what I'm trying to experiment with is compressing 
> XML on the server-side and decompressing it on the client-side to 
> see if I can improve performance. If anyone has thoughts or 
> suggestions on this topic, I'm all ears. (AMF is not supported on 
> the server I'm using, so AMF-over-HTTP is not an option.)

if your interested, i've compressed an xml string in flex like this

var byteData:ByteArray = new ByteArray();
byteData.writeUTFBytes("<Root><something /></Root>");
byteData.position = 0;
byteData.compress();

Then passed this ByteArray to a c# webservice, where i uncompressed it 
(using sharpziplib library) like this.

// Unzip (c# code) - myBytes are the compressed bytes from flex 
byte[] writeData = new byte[4096];
Stream inStream = new InflaterInputStream(new MemoryStream(myBytes));
while (true)
{
   iSize = inStream.Read(writeData, 0, writeData.Length);
   if (iSize == 0)
   {
     break;
   }
stringXML += System.Text.Encoding.ASCII.GetString(writeData, 0, 
iSize);
}



Reply via email to