I want to manipulate .zip and .rar files from C++. What libraries should I use?
+4
A:
The zlib library comes with a sample showing how you can use it with .zip files (I think it's called "minizip" or something, though I haven't had much experience with it personally).
RAR is a bit difference, since it's basically proprietary. I don't know if there's any libraries that can do it.
Dean Harding
2010-03-09 02:26:03
Seems to be the de facto zip standard. +1
Billy ONeal
2010-03-09 03:53:41
For RAR you cannot create/modify an archive but you can 'unrar-it' using the freeware UnRAR lib from: http://www.rarlab.com/rar_add.htm
Eugen Constantin Dinca
2010-03-09 04:34:05
A:
Codeka is correct in recommending zlib, but if you're on Windows, you might want to take a look at ZipUtils, which is zlib repackaged with a simpler interface and a few bells and whistles added.
Billy ONeal
2010-03-09 03:53:00
+1
A:
zlib and minizip, yes. minizip was last updated in 2005. Some facts about version 1.01e:
- This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g, WinZip, InfoZip tools and compatible.
- Multi volume ZipFile (span) are not supported.
- Encryption compatible with pkzip 2.04g only supported
- Old compressions used by old PKZip 1.x are not supported
boost::iostreams also is a good choice. Open Source Ogre3d has implementation of zip decompressor, you can read it.
topright
2010-03-14 20:52:06