Exemplo n.º 1
0
 public static void Decompress(Stream stream, byte[] input)
 {
     using (var zlib = new InflaterInputStream(stream)) {
         zlib.IsStreamOwner = false;
         zlib.Write(input, 0, input.Length);
         zlib.Flush();
         zlib.Close();
     }
 }
Exemplo n.º 2
0
 public static byte[] Decompress(byte[] input)
 {
     using (var mem = new MemoryStream()) {
         using (var zlib = new InflaterInputStream(mem)) {
             zlib.Write(input, 0, input.Length);
             zlib.Flush();
             zlib.Close();
             return(mem.ToArray());
         }
     }
 }