Dotnetzip is a short and easy-to-use. Net class library used to operate ZIP files. It supports any. Net Language and allows you to easily create, read, and update ZIP files. It can also be used in. netcompact framework. Below are some simple examples: 1. Encrypted compression: using (ZipFile zip = new ZipFile()) { zip.Password = sPassword; //set pwd zip.AddDirectory(sZipDir); zip.Save(sSavePath + @"\" + sSaveName); } 2. Add the following to the compressed file: using (ZipFile zip = new ZipFile("Backup.zip")) { zip.Password= "123456!"; zip.AddFile("ReadMe.txt"); zip.AddFile("7440-N49th.png"); zip.AddFile("2005_Annual_Report.pdf"); zip.Save(); } 3. decompress the package to the specified directory: using (ZipFile zip = ZipFile.Read("D:\\test\\2007.zip")){ foreach (ZipEntry e in zip) { Console.WriteLine("file name:{0}", e.FileName); Console.WriteLine(e.Comment); e.Extract("D:\\test\\pwdata", true); // overwrite == true }} For more detailed use, see: http://www.codeplex.com/DotNetZip |