DotNetZip on codeplex:http://dotnetzip.codeplex.com/
Compression:
//1. Compression//specify encoding to prevent Chinese garbled situation using(ZipFile zip =NewZipFile (System.Text.Encoding.UTF8)) { //Add this map file to the "Images" directory in the ZIP archive to the "Images" directory in the ZIP archiveZip. AddFile (@"E:\DemoZip\1.png","Images"); //Add the report to a different directory in the archive adds reports to other directories in the archiveZip. AddFile (@"E:\DemoZip\2.txt","Files"); //add to root directoryZip. AddFile (@"E:\DemoZip\3.txt"); Zip. Save (@"E:\DemoZip\ZipFile.zip"); } //2. Unzip//specify encoding to prevent the presence of Chinese garbled characters//if case: The path has illegal characters using(ZipFile zip =NewZipFile (@"E:\DemoZip\ZipFile.zip", System.Text.Encoding.UTF8)) {zip. Extractall (@"E:\DemoZip\ZipFileFolder", extractexistingfileaction.overwritesilently); }
C #. NET uses the DotNetZip open source class library to handle compression/decompression ZIP handling garbled cases