Compatibility with .NET GZipStream class? (General questions)
I have a C# WebService that returns a GZip compressed string in Base64. The code is:
...
[WebService(Namespace= http:... )]
public class WebSvc{
[WebMethod]
public string GetData() {
string text = Text to compress ;
byte[] buffer = Encoding.ASCII.GetBytes(text);
MemoryStream ms = new MemoryStream();
using (GZipStream zip = new GZipStream(ms, CompressionMode.Compress, true))
{
zip.Write(buffer, 0, buffer.Length);
zip.Close();
}
ms.Position = 0;
MemoryStream outStream = new MemoryStream();
byte[] compressed = new byte[ms.Length];
ms.Read(compressed, 0, compressed.Length);
return Convert.ToBase64String(compressed);
}
In the client (a VB6 app), I call the WebService(with wodHttpDLX), extract the string from de XML (GetDataResult)and I want to decompress it with wodCrypt. The code:
Dim org as New MemBlob
Dim dst As New MemBlob
Dim zip As New wodCryptCom
zip.Type = None
zip.Compression = GZipCompression
org.FromBase64(GetDataResult)
zip.Decrypt org, dst <-- In this point I get error Failed to decompress data
Any ideas?
Thanks
Complete thread:
- Compatibility with .NET GZipStream class? - Paco Lianez, 2007-11-26, 17:32
- Re: Compatibility with .NET GZipStream class? - wodDamir, 2007-11-26, 18:53
- Re: Compatibility with .NET GZipStream class? - Paco Lianez, 2007-11-26, 19:07
- Re: Compatibility with .NET GZipStream class? - wodDamir, 2007-11-26, 18:53