有一个内置拉链库.NET 3.5?
Is there a built-in zip library in .NET 3.5?
如果不是,有什么流行的开源.NET压缩库。
If not, what are the popular open source .net zip libraries.
没有内置库。 有开源的选择。
There is no built-in library. There are open-source options.
DotNetZip 之一。操作简单,使用方便。它具有很好的功能:AES加密,定时加密,溪流,ZIP64,文件的意见,统一code,进度事件,等等。而且它是免费和开源的。
DotNetZip is one. Simple, easy to use. It has good features: AES Encryption, regular encryption, streams, ZIP64, file comments, Unicode, progress events, more. And it's free and open source.
下面是一些示例code。
Here's some sample code.
// extract all Photoshop files larger than 100mb
using (ZipFile zip1 = ZipFile.Read(ZipFileName))
{
var LargePhotoShopFiles = zip1.SelectEntries("name = *.psd and size > 100mb");
foreach (ZipEntry e in LargePhotoShopFiles)
{
if (e.UsesEncryption)
e.ExtractWithPassword("unpackDirectory", "VerySecret!");
else
e.Extract("unpackDirectory");
}
}