byte[] httpDecompress(HttpDatagram http)
{
int magicnum = 0x1f8b;
Stream str= http.Body.ToMemoryStream();
using (var zipStream = new GZipStream(str, CompressionMode.Decompress))
using (var resultStream = new MemoryStream())
{
zipStream.CopyTo(resultStream);
return resultStream.ToArray();
}
}
there is the code but it gives a magic number error. How can i find the beginning of the GZip string, i think the source of problem is there. Can anyone help?