In the upcoming v2013.1 release, we will introduce a new Compression Library for .NET. The new Zip Compression Library was build from the ground up to help with compression and decompression tasks in your Desktop or ASP.NET (full and medium trust) applications. The library will allow you to fully manage existing .zip archive files, create new ones or to compress and decompress in memory streams.
The usage is very straight forward, to create a new archive:
using (ZipArchive archive = newZipArchive()) {
archive.EncryptionType = EncryptionType.PkZip;
archive.AddFiles(
newString[] {
@"C:\Source\File 1.txt",
@"C:\Source\File 2.txt",
@"C:\Source\File 3.txt" },
@"\");
archive.AddDirectory(@"C:\Source\Folder\", @"\Folders\");
archive.Save(@"C:\Archives\Archive.zip");
}
To extract an existing one:
using (ZipArchive archive = ZipArchive.Read(@"C:\Archives\Archive.zip")) {
archive.Extract(@"C:\Exptracted\");
}
Cheers,
Azret








