开发者

Creating a Zip file programmatically C++

开发者 https://www.devze.com 2023-02-16 01:53 出处:网络
I am trying to find a lib that will allow me to produce a zip file. I have a list of files that I want to place into the archive. The first suggestion I had was to use boost with zlib, however that tu

I am trying to find a lib that will allow me to produce a zip file. I have a list of files that I want to place into the archive. The first suggestion I had was to use boost with zlib, however that turned out to be a dead end. I also looked at zziplib, however its a read only lib.

If anyone开发者_如何转开发 has any experience with doing this, and had used a lib successfully before I would love to hear about it.

This is for a C++ project in MSVC9, and the lib must be free to use commercially.


Use zlib without boost. Zlib is pretty much the easiest way to deal with ZIP files in tight memory and time, but it is a C library and most attempts to C++ify it have fallen down miserably and just made more trouble than simply biting the bullet and working with pointers and so forth.


Check out Zip Utils.

WARNING: This code has known bugs. It doesn't deal with non-ASCII filenames correctly. It doesn't deal with passwords correctly.


Why was zlib a "dead end"? It's probably what you should be using. Maybe someone here can help you figure out how to get it to work.

0

精彩评论

暂无评论...
验证码 换一张
取 消