有没有在.NET 3.5中内置拉链库? [英] Is there a built-in zip library in .NET 3.5?
本文介绍了有没有在.NET 3.5中内置拉链库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个内置拉链库.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");
}
}
这篇关于有没有在.NET 3.5中内置拉链库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文