unzip .zip file and browse to compressed files

Hi, I am looking for a way to uncompress a zip-file (which contains multiple files/dirs) and browse through the contents. Does boost provide support for the first part? I looked at iostreams with a zlib uncompressor, but as far as I can see it assumes a single zipped file. Thank you, Andrej

Andrej van der Zee wrote:
I am looking for a way to uncompress a zip-file (which contains multiple files/dirs) and browse through the contents. Does boost provide support for the first part? I looked at iostreams with a zlib uncompressor, but as far as I can see it assumes a single zipped file.
Hi Andrej, I don't believe Boost has anything that can do this. I have had success using "MiniZip" by Gilles Vollant. It's just a handful of C files. A simple C++ wrapper is easy to write. Beware that there are many variants of the zip format; this is OK if you have control over the files that are being decompressed, but it's a pain if the end user can submit anything and expect it to work. Regards, Phil.

On Wed, Jan 27, 2010 at 6:41 AM, Andrej van der Zee <mavdzee@yahoo.co.uk> wrote:
Hi,
Thanks for your reply.
Hi Andrej,
I don't believe Boost has anything that can do this.
Yeah that is what I thought, unfortunately. It would be a nice augmentation for boost file-system though, to be able to browse to compressed directories.
I've started working on such a thing (although the first format targeted is .tar.bz2, .zip should not be much harder to read). I'm still trying to sort out how to use git for boost contributions at this point. gitorious was apparently broken when I tried to clone the svn branch. If I still can't do it, I might just push this to github which works for me.

I've started working on such a thing (although the first format targeted is .tar.bz2, .zip should not be much harder to read). I'm still trying to sort out how to use git for boost contributions at this point. gitorious was apparently broken when I tried to clone the svn branch. If I still can't do it, I might just push this to github which works for me.
Did you check the hamigaki library? There are several archiver supported: http://hamigaki.sourceforge.jp/doc/html/archivers.html even compress/uncompress of tar, zip (zip64)! Unfortunately all in Japanese, but C++ is international ... If I would have time and knowlege I would like write a virtual file system using this with the vfs API from http://commons.apache.org/vfs/ but I'm hobbyist. Regards Olaf

2010/1/27 Andrej van der Zee <mavdzee@yahoo.co.uk>:
Yeah that is what I thought, unfortunately. It would be a nice augmentation for boost file-system though, to be able to browse to compressed directories.
I'd really like that, since it would mean that all the filesystem-touching functions (not the path decomposition ones, for instance) would get a filesystem context. That would allow all sorts of possibly-interesting VFS operations, like merging directories transparently to consumers of a filesystem. It would also help make clearer the difference between, for example, a path simplification function that only looks at the path, and a path canonicalization function that needs to look at the filesystem too (for symlinks).

Andrej van der Zee wrote:
Hi,
Thanks for your reply.
Hi Andrej,
I don't believe Boost has anything that can do this.
Yeah that is what I thought, unfortunately. It would be a nice augmentation for boost file-system though, to be able to browse to compressed directories.
Cheers, Andrej
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
I've been using this behind a C++ wrapper: http://icculus.org/physfs/ I would love to see similar functionality added to the file system library.

On 1/26/2010 11:52 PM, Andrej van der Zee wrote:
Hi,
I am looking for a way to uncompress a zip-file (which contains multiple files/dirs) and browse through the contents. Does boost provide support for the first part? I looked at iostreams with a zlib uncompressor, but as far as I can see it assumes a single zipped file.
Iostreams currently provides compression/decompression filters currently for the gzip and bzip2 file formats, as well as zlib compression, but it does not currently provide a zip file format compressor. You could build your own zip file format support using the zlib compression protocol. Ed
participants (7)
-
Andrej van der Zee
-
eg
-
Jason Felice
-
Kenny Riddile
-
Olaf Peter
-
Phil Endecott
-
Scott McMurray