9
此代码接收GZip编码的字符串。我怎样才能解码它?如何解压流(C#)中的GZip?
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?
远远超出,这让事情变得如此简单! – user1500403