I need to use the following:
using Microsoft.Deployment.Compression.Zip;
From looking online it says I need the following reference dlls
Microsoft.Deployment.Compression.dll
Microsoft.Deployment.Compression.Zip.dll
but I could not find these in the .NET folder.
Just as a FYI, below is how I plan to use it.
// CREATING ZIP FILE BY ADDING LIST OF FILES
ZipInfo zip = new ZipInfo(@"C:\testarchive1.zip");
List<strng> files = new List<string>();
files.Add(@"C:\test1.txt");
files.Add(@"C:\test2.txt");
files.Add(@"C:\test3.txt");
zip.PackFiles(null, files, null);
// CREATING ZIP FILE BY ADDING FOLDER (WITH SUB-FOLDERS) USING MAXIMUM COMPRESSION
zip = new ZipInfo(@"C:\testarchive2.zip");
zip.Pack(@"C:\Test", true, Microsoft.Deployment.Compression.CompressionLevel.Max, null);
Try this :
http://dotnetzip.codeplex.com/
Sample code :
Just as easy as your example.