您的位置:首页 > 其它

利用 SharpZipLib方便地压缩和解压缩文件

2005-12-23 11:39 323 查看
利用 SharpZipLib方便地压缩和解压缩文件
最新版本的SharpZipLib(0.84)增加了很多新的功能,其中包括增加了FastZip类,这让我们可以非常方便地把一个目录压缩成一个压缩包,经测试可以很好地支持文件中包含中文以及空格的情况。

1 public static void PackFiles(string filename, string directory)
7
21 public static bool UnpackFiles(string file, string dir)
27using ICSharpCode.SharpZipLib.Zip;
using System.IO;
使用方法就不介绍了。

你可以到其官方网站下载最新版本的SharpZipLib:

http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx
或者直接使用该链接下载:

Compiled assembly with documentation and install scripts Download [488 KB]
Source code and samples Download [622 KB]
Help file only Download [485 KB]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: