Beispiel #1
0
 public void DecompressStream()
 {
     //解压 请求
     byte[] bytes = StreamDataHelper.ReadDataToBytes(_originalStream);
     bytes = CompressHelper.GZipDecompress(bytes);
     _workStream.Write(bytes, 0, bytes.Length);
     _workStream.Position = 0;
 }
Beispiel #2
0
        public void CompressStream()
        {
            //压缩 响应
            Stream stream = CompressHelper.GZipCompress(_workStream);

            byte[] buffer = StreamDataHelper.ReadDataToBytes(stream);
            _originalStream.Write(buffer, 0, buffer.Length);
        }