GZip解压.NET代码
public static byte[] GZipDecompress(Byte[] bytes)
{
BinaryReader br = null;
System.IO.Compression.GZipStream dcmp = null;
try
{
using (MemoryStream ms = new MemoryStream(bytes))
{
dcmp = new System.IO.Compression.GZipStream(ms, System.IO.Compression.CompressionMode.Decompress);
br = new BinaryReader(dcmp);
return br.ReadBytes((int)dcmp.Length);
}
}
catch (System.Exception e)
{
}
finally
{
br.Close();
dcmp.Close();
}
return bytes;
}
摘自 appleII的博客
补充:Web开发 , ASP.Net ,