9
Mã này nhận được chuỗi được mã hóa GZip. Làm thế nào tôi có thể giải mã nó?Làm thế nào để giải nén GZip trong luồng (C#)?
Stream stream = ret.GetResponseStream();
System.IO.StreamReader reader = new System.IO.StreamReader(stream, Encoding.Default);
string answer = reader.ReadToEnd();//answer is GZip encoded string !
byte[] bytes = Encoding.Default.GetBytes(answer);
//???
GZipStream compStream = new GZipStream(stream, CompressionMode.Decompress);
// ... what's next?
Xa lánh, điều đó giúp mọi việc trở nên dễ dàng hơn nhiều! – user1500403