Пример #1
0
 public static byte[] Compress(byte[] bytData)
 {
     MemoryStream ms = new MemoryStream();
     Stream s = new DeflaterOutputStream(ms);
     s.Write(bytData, 0, bytData.Length);
     s.Close();
     return (byte[])ms.ToArray();
 }
Пример #2
0
 public ZLib()
 {
     zlibstream = new DeflaterOutputStream(memory);
 }