好用的压缩/解压缩类。

下载页面:http://www.wischik.com/lu/programmer/zip_utils.html 相关页面:http://www.codeproject.com/useritems/zip_utils.asp

ZIP UTILS ----------- by Lucian Wischik, June 2004 - July 2005 These files are a simple way to add zip/unzip functionality to your windows programs, both win32 and windows-ce. For unzipping, add "unzip.cpp" to your project. Then, for example,

#include " unzip.h " // HZIP hz = OpenZip( " c:/stuff.zip " , 0 );   ZIPENTRY ze; GetZipItem(hz, - 1 , & ze); int numitems = ze.index; for ( int i = 0 ; i < numitems; i ++ )   { GetZipItem(hz,i, & ze);     UnzipItem(hz,i,ze.name);   }   CloseZip(hz);

For zipping, add "zip.cpp" to your project. (You can add just one of zip/unzip, or both; they function independently and also co-exist.)

#include " zip.h " // HZIP hz = CreateZip( " c:/simple1.zip " , 0 );   ZipAdd(hz, " znsimple.bmp " , " c:/simple.bmp " );   ZipAdd(hz, " znsimple.txt " , " c:/simple.txt " );   CloseZip(hz);

There is lot of flexibility... When you unzip, the zipfile can be a handle or a file on disk or a block of memory or a resource.And when you unzip the items, you can unzip them directly to a handle or diskfile or pipe or block of memory. You might even spawn off a thread to play wav files, connected via a pipe,and unzip directly from a resource into that pipe. Similarly you can create a zip in different ways (even creating it as a dynamically growable buffer that's backed by the system paging file), and the items you add can come from anywhere.

The functions all support unicode filenames. And the final '0' argument in OpenZip/CreateZip is for a password, in case of encryption.

For more information, see the header files or the example source code. The example comes with project files for Visual Studio .NET and Embedded Visual C++3 and Borland C++Builder6.

The actual core source code for zipping and unzipping comes from www.info-zip.org and www.gzip.org/zlib, by Jean-Loup Gailly and Mark Adler and others, and is freely available at the respective websites. All I did was repackage them and add some small extras.

csdn download http://download.csdn.net/source/500080

一个很好用的zip/unzip类相关推荐

  1. php上下翻页,一个很不错的PHP翻页类

    一个很不错的PHP翻页类,包含了使用例子,感谢Alan /* * Created on 2007-6-8 * Programmer : Alan , Msn - haowubai@hotmail.co ...

  2. php弹出消息翻页,一个很不错的PHP翻页类

    复制代码代码如下: /* *Createdon2007-6-8 *Programmer:Alan,Msn-haowubai@hotmail.com *PHP100.comDevelopaproject ...

  3. 一个做得很好的电子产品测评类网站:Zealer

    无意中发现了一个做得很好的电子产品测评类网站--Zealer.http://www.zealer.com/ 站长王自如很有个人魅力.尤其他在老罗发布会点评的那期节目里. 与他类似,我也是做质量评测的, ...

  4. 一个很不错的C++类的练习题目

    //一个很不错的C++类的练习题目1.定义一个C++枚举(作为枚举结构),有以下四个值:一次.每天.每周.每月. 为这个枚举定义一个重载的输出操作符<<,根据枚举值,它将每日.每周.每月和 ...

  5. linux压缩和解压缩类命令|--zip/unzip指令

    zip/unzip指令 说明: zip 用于压缩文件,unzip用于解压,这个项目打包发布常用 基本语法 zip [option] xxx.zip 将要压缩的内容 (功能描述:压缩文件和目录的命令) ...

  6. [验证码实现] Captcha 验证码类,一个很个性的验证码类 (转载)

    点击下载 Captcha.zip /// <summary> /// 类说明:条码生成类 /// 编 码 人:苏飞 /// 联系方式:361983679 /// 更新网站:[url=htt ...

  7. zip/unzip 命令

    zip 命令 功能说明:压缩文件. 语 法:zip [-AcdDfFghjJKlLmoqrSTuvVwXyz$][-b <工作目录>][-ll][-n <字尾字符串>][-t ...

  8. zip unzip 命令

    zip 命令 zip是个使用广泛的压缩程序,文件经它压缩后会另外产生具有".zip"扩展名的压缩文件. 功能说明:压缩文件 语法:zip [-AcdDfFghjJKlLmoqrST ...

  9. fatjar打包mysql_一个简单的解压ZIP Excl文件---gt;按时间读取Excle文件,通过Fat jar打成jar相对应的添加到mysql数据库中。 - 明月 - ITeye博客...

    写道 一个简单的解压ZIP Excl文件--->按时间读取Excle文件,通过Fat jar打成jar相对应的添加到mysql数据库中. package common.gaoyang; impo ...

最新文章

  1. TCP数据流稳定性--TCP分片,重组及乱序
  2. pgbench的使用简介
  3. 田志刚:为什么要尊重老师?
  4. Spring MVC 中的http Caching
  5. MySQL - 创建存储过程Procedure,Do While实现循环
  6. php eot eod_EOD的完整形式是什么?
  7. ShardingSphere(五) 公共表配置,实现读写改操作
  8. SpringBoot整合kafka实战之带回调的生产者
  9. mac版mysql 1290_Mac 终端下mysql load data infile 文件路径 into table 表名称 操作,[Error Code] 1290 - The MyS...
  10. 到底图啥?百度工程师非法控制155台服务器“挖矿”,被判刑3年
  11. softmax回归的从零开始实现-09-p4
  12. Cmd替代者 Cmder
  13. esp8266开发入门教程(基于Arduino)——环境安装
  14. 什么是html文件?html格式如何打开?(图文讲解)
  15. 麒麟3.2安装微软雅黑字体
  16. 测试技术-兼容性测试
  17. 隐秘的度假地_如何避免花太多钱去度假
  18. 如何制作高大上的PPT--图片
  19. https无法访问 宝塔_宝塔https访问未开启SSL站点跳转到已经开启SSL站点
  20. ImGo Golang 图片处理库

热门文章

  1. 2019年关于我的10个「最」
  2. LINUX下的SD卡分区
  3. APISpace 汉语拆字API
  4. IELTS 雅思阅读和听力答题技巧
  5. 计算机网络的发展历程
  6. IMSI和MSISDN
  7. 百度 和 谷歌 的站内搜索引擎代码
  8. linux kernel网络驱动
  9. Cisco实验-VTP基本使用
  10. MD5码加密(盐值加密)