using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Text; namespace Bowin.Common.Utility { public class ZipHelper { public static void SaveZipFile(List fileList, Stream stream) { using (var zipArchive = new ZipArchive(stream, ZipArchiveMode.Create)) { fileList.ForEach(file => { var zipArchiveEntry = zipArchive.CreateEntryFromFile(file.FilePath, file.FileName); }); } } } public class ZipFile { public string FilePath { get; set; } public string FileName { get; set; } } }