dotNetZip on CodePlex: http://dotnetzip.codeplex.com/

详细的可以看源代码……总之感觉比SharpZipLib好用。而且DotNetZip支持VB,C#以及任何.NET语言。

加压:(从CodePlex上偷过来的)

using (ZipFile zip = new ZipFile())
{
// add this map file into the "images" directory in the zip archive 把这个PNG文件添加到zip档案的"images"目录下
zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
// add the report into a different directory in the archive 然后把PDF文件添加到zip档案的"files"目录下,把ReadMe.txt放到根目录
zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
zip.AddFile("ReadMe.txt");
   // 把zip档案保存为MyZipFile.zip
zip.Save("MyZipFile.zip");
}

解压更简单:

using (ZipFile zip = new ZipFile("MyZipFile.zip"))
{
  zip.ExtractAll("c:\\myfolder", ExtractExistingFileAction.OverwriteSilently);
}

这就可以了!什么问题都木有,是不是比SharpZipLib方便多了!

最新文章

  1. Inverted sentences
  2. Des加解密算法
  3. HTML 学习笔记 CSS样式(背景)
  4. Java Code Examples for javax.servlet.http.Part
  5. Fbric、Ansible、Docker、Chaos Monkey:DevOps工具的年中回顾
  6. JAVA大数运算
  7. 沈逸老师PHP魔鬼特训笔记(6)--巫术与骨架
  8. EF 实体字段设置主键和自增
  9. Fibonacci Numbers
  10. /etc/security/limits.conf不生效
  11. Linux seq_printf输出内容不完整的问题
  12. mysql查看连接数排查问题
  13. Linux搭建SVN环境
  14. 相对于父元素的fixed定位的实现
  15. 让对象支持with语句
  16. java中二维数组的复制克隆
  17. URL helper 逆向破解思路+详细过程 利用messagebox破解
  18. Java套接字Socket编程--TCP参数
  19. 2018/03/20 每日一个Linux命令 之 cp
  20. unity5 where is "Edit->Render Settings"?

热门文章

  1. 在linux下运行java工程
  2. Pattern Recognition And Machine Learning读书会前言
  3. lecture9-提高模型泛化能力的方法
  4. Jump Game 的三种思路 - leetcode 55. Jump Game
  5. 系统升级日记(1)- 升级到SQL Server 2012
  6. JavaScript面试题收集(一)
  7. nios II--实验5——定时器硬件部分
  8. Matlab 的reshape函数
  9. Java 增强型的for循环 for each
  10. android之Activity回传数据