.NET 3.5中是否有内置的zip库? [英] Is there a built-in zip library in .NET 3.5?

查看:126
本文介绍了.NET 3.5中是否有内置的zip库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.NET 3.5中是否有内置的zip库?

Is there a built-in zip library in .NET 3.5?

如果没有,什么是流行的开源的.net zip库。

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,文件注释,Unicode,进度事件,更多。

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.

以下是一些示例代码。

    // 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中是否有内置的zip库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆