利用ICSharpCode.SharpZipLib进行压缩】的更多相关文章

#ZipLib is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform. It is implemented as an assembly (installable in the GAC), and thus can easily be incorporated into other projects (in any .NET language).#ZipLib was ported f…
C# 利用ICSharpCode.SharpZipLib实现在线加密压缩和解密解压缩   这里我们选用ICSharpCode.SharpZipLib这个类库来实现我们的需求. 下载地址:http://icsharpcode.github.io/SharpZipLib/ 1.单个或多个文件加密压缩 class ZipClass { public void ZipFile(string FileToZip, string ZipedFile, int CompressionLevel, int Bl…
今天过中秋节,当地时间(2013-09-08),公司也放假了,正好也闲着没事,就在网上学习学习,找找资料什么的.最近项目上可能会用到压缩的功能,所以自己就先在网上学习了,发现一个不错的用于压缩的DLL文件,并且免费,而且开放源码: 这就是我今天介绍的对象: SharpZipLib 我们先看看它的官方介绍吧: #ziplib (SharpZipLib, formerly NZipLib) is a Zip, GZip, Tar and BZip2 library written entirely…
我们 开发时经常会遇到需要压缩文件的需求,利用C#的开源组件ICSharpCode.SharpZipLib, 就可以很容易的实现压缩和解压缩功能. 压缩文件: /// <summary> /// 压缩指定文件生成ZIP文件 /// </summary> /// <param name="topDirName">顶层文件夹名称</param> /// <param name="fileNamesToZip">…
这里我们选用ICSharpCode.SharpZipLib这个类库来实现我们的需求. 下载地址:http://icsharpcode.github.io/SharpZipLib/ 1.单个或多个文件加密压缩 class ZipClass { public void ZipFile(string FileToZip, string ZipedFile, int CompressionLevel, int BlockSize) { if (!System.IO.File.Exists(FileToZ…
官网http://www.icsharpcode.net/ 支持文件和字符压缩. 创建全新的压缩包 第一步,创建压缩包 using ICSharpCode.SharpZipLib.Zip; ZipOutputStream zipOutputStream = new ZipOutputStream(File.Create(strZipPath)); 参数:strZipPath,提供压缩后的文件包全路径,即地址和文件名.如,D:\tmp\01.rar第二步,向压缩包中添加压缩包的文件名 ICShar…
ICSharpCode.SharpZipLib.dll下载地址 1.压缩某个指定文件夹下日志,将日志压缩到CompressionDirectory文件夹中,并清除原来未压缩日志. #region 压缩logs文件夹下日志 public static void CompresslogDic() { try { string logFilePath = AppDomain.CurrentDomain.BaseDirectory + "logs"; DirectoryInfo logsDic…
首先通过NuGet管理安装ICSharpCode.SharpZipLib.dll 以下是压缩的通用方法: using System; using System.IO; using System.Web; using System.Linq; using System.Collections.Generic; using ICSharpCode.SharpZipLib.Zip; namespace Common { /// <summary> /// 压缩文件帮助类 /// </summa…
最近,在项目中经常需要处理压缩和解压缩文件的操作.经过查找,发现了ICSharpCode.SharpZipLib.dll ,这是一个完全由c#编写的Zip, GZip.Tar . BZip2 类库,可以方便地支持这几种格式的压缩解压缩,详细参考了 ICSharpCode.SharpZipLib 插件使用示例.整理很详细.记录备用.…
官方网站:http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx 插件描述: ICSharpCode.SharpZipLib.dll 是一个完全由c#编写的Zip, GZip, Tar and BZip2 library,可以方便地支持这几种格式的压缩解压缩, SharpZipLib 的许可是经过修改的GPL,底线是允许用在不开源商业软件中,意思就是免费使用. 一.在ThinksKing的Plugins里面找到已经解压好的Sh…