tags:

views:

720

answers:

2

I'm looking for a way to add or remove files to/from an existing ZIP archive, or any other archive format for that matter as long as there are cross platform APIs, without having to rewrite a new zip file with new files added to it, or sans items deleted from it.

With ZIP files, the catalog is placed at the end of the file so that, and some parts of the zip file will likely have to be rewritten each time. I'm just trying to avoid having to rewrite the whole thing every time. The archive files I'm looking at dealing with will be large, and speed is important.

Is there any C++ library out there that does what I'm looking for?

A: 

Several zip libraries are available, two of the leading libraries are:

http://www.gzip.org/

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

Adam Davis
Alas, the 7zip API is Windows only last time I checked.
Grant Limberg
No matter, the 7zip SDK supports the LZMA compression standard, but doesn't appear to have easy support for zip. The two more common libraries are now listed above.
Adam Davis
http://www.zlib.net/ is the correct address for the library related to gzip (the URL above is for a site mostly about an executable, not a library).
John Zwinck
GZip and ZLib are not "zip" files though.
SoapBox
Zlib does require extra work to support the zip archive format, but the compression is the same. Sounds like Zipios++ is exactly what he's after, though. I'll leave this up for others to reference.
Adam Davis
+3  A: 

Zipios++ provides direct access to files inside ZIP archives.

Sparr