Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a Zip file programmatically C++

Tags:

c++

zip

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.

like image 274
0xC0DEFACE Avatar asked Mar 10 '11 00:03

0xC0DEFACE


1 Answers

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.

like image 119
Crashworks Avatar answered Nov 09 '22 06:11

Crashworks