Exemplo n.º 1
0
 public byte[] GUnzipBytes(byte[] gzBuffer)
 {
     using (var compressedStream = new MemoryStream(gzBuffer))
     using (var zipStream = new GZipStream(compressedStream, CompressionMode.Decompress))
     {
         return zipStream.ReadFully();
     }
 }
Exemplo n.º 2
0
 public string GUnzip(byte[] gzBuffer)
 {
     using (var compressedStream = new MemoryStream(gzBuffer))
     using (var zipStream = new GZipStream(compressedStream, CompressionMode.Decompress))
     {
         var utf8Bytes = zipStream.ReadFully();
         return Encoding.UTF8.GetString(utf8Bytes, 0, utf8Bytes.Length);
     }
 }