0xC0DEFACE
0xC0DEFACE

Reputation: 9211

Creating a Zip file programmatically C++

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.

Upvotes: 5

Views: 12165

Answers (3)

user195488
user195488

Reputation:

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.

Upvotes: 2

Crashworks
Crashworks

Reputation: 41374

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.

Upvotes: 9

J. Taylor
J. Taylor

Reputation: 4855

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.

Upvotes: 1

Related Questions