Пример #1
0
 public static void CompressToFile(this byte[] data, FileInfo destFile)
 {
     using (var fileStream = destFile.Create())
     using (var compressionStream = new DeflateStream(fileStream, CompressionMode.Compress))
     {
         compressionStream.WriteBytes(data);
     }
 }