tags:

views:

2395

answers:

6

I want to be able to zip files from my non-gui C/C++ application, on several versions of Windows, Linux/Unix, and MacOS.

The user will compile and run using this app using Eclipse + makefile or VisualStudio. I don't want the user to have to install something separately, or have my makefile install executables.

Prefer open-source. I'm already looking at "Zip 3.0"...

+8  A: 

We've used zlib a couple times here. It's a fairly standard library that has implementations in most main languages.

Herms
+1  A: 

See http://stackoverflow.com/questions/118547/creating-a-zip-file-on-windows-xp2003-in-cc for information for Windows.

warren
A: 

http://www.info-zip.org/UnZip.html

HTH

plan9assembler
+1  A: 

ZLIB - the most portable library in the world. open source, very proven and reliable. The gold standard. why use anything else?

Cheeso
... because it doesn't handle *zip files*? It just handles stream compression.
BastiBense
In the controb/minizip directory there are zip utilities.
Cheeso
A: 

Others have mentioned zlib, which is nice and fairly easy.

The 7-Zip (LZMA) SDK is more complex but also has very nice compression rates.

Kris Kumler
A: 

How about this:

http://zziplib.sourceforge.net/

BastiBense