C / C ++: easy to unpack into memory

I need to find a library that allows me to easily get a list of directories of all files inside a ZIP archive and allows me to extract any file from the archive into memory (buffer). Preferably, this should be a high-level library, as my requirements are not very complex (what I mentioned above is pretty much all I need).

I used to try PhysFS, which has the behavior that I need (it is easy to access files inside the archive), but it does not work for other reasons (there are many archives, and PhysFS will require me to mount them all separately, which is not option). Another library that has the functionality I need is Chilkat , but it's shareware, so I can't use it.

Any other suggestions?

+3
source share
2 answers

While .zip uses zlib compression at http://zlib.net , this is not enough to get a list of directories from a .zip file.

You also need code that can read the word format .zip. Check out Minizip http://www.winimage.com/zLibDll/minizip.html . It provides code and simple zip / unzip command line executables.

edit 2 The code is completely C (also Zlib) - on the page there are links to two C ++ cover libraries that seem dead.

+3
source

zlib? http://zlib.net/ " Spiffy, ( , , )"

+2

All Articles