I am creating the transmitting the compress data to the flash swf file. The transmission works fine.
here is the vb.net code. the variable resp is the data that needs to be compressed.
Dim memory As New MemoryStream
Dim byteValue() As Byte = System.Text.Encoding.ASCII.GetBytes(resp)
Dim deflater As ICSharpCode.SharpZipLib.Zip.Compression.Deflater = New ICSharpCode.SharpZipLib.Zip.Compression.Deflater(9, True) 'Dim outStream = New ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream(memory, deflater)
outStream.IsStreamOwner =
False
outStream.Write(byteValue, 0, byteValue.Length)
outStream.Flush()
outStream.Finish()
outStream =
Nothing
deflater =
Nothing
Dim vStateStr As String = System.Convert.ToBase64String(memory.ToArray())
-------------------------------
here is what adobe says about uncompress>
Flash Player supports only the default algorithm, deflate. The deflate compression algorithm is described at http://www.ietf.org/rfc/rfc1951.txt.
The uncompress gives this error
Main Thread (Suspended: Error: Error #2058: There was an error decompressing the data.)
flash.utils::ByteArray/uncompress [no source]
I can't get the ICSharpCode help file to open any pages so I need some guidance.
How do i set the properties to obtain a compressed string that is compliant?