Boost logo

Boost Users :

From: eg (egoots_at_[hidden])
Date: 2007-09-17 02:08:52


Surya Kiran Gullapalli wrote:
> Hello all,
> I'm newbie to boost::iostreams library.
>
> I'm trying to unzip a .zip file. for that I'm using iostream's
> zlib_decompressor class to inflate it. I'm using the sample code
> provided in the documentation. What I was getting is an exception
> (zlib error).
>
> My question is can i use boost::iostreams classes for unzipping a .zip
> file.? If so how? a small sample snippet would be helpful.
>
> Thanks in advance,
> Surya

zlib and zip are different archive file formats.

The iostreams zlib_[de]compressor [reads]writes data using the
ZLIB format (http://www.ietf.org/rfc/rfc1950.txt).

Whereas the zip file format is a different format. See:
http://www.pkware.com/business_and_developers/developer/appnote/

You can use zlib_[de]compressor to implement your own zip file archiver,
but you will have to code this yourself as it is not included in the
iostreams library at this time.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net