Boost logo

Boost :

Subject: Re: [boost] [iostreams] array and gzip_decompressor
From: eg (egoots_at_[hidden])
Date: 2010-03-01 01:39:02


On 2/23/2010 10:48 PM, Nikolay Mladenov wrote:
>
> Is there another way I should be creating gzipped stream into memory?
> Or maybe the arrays could be made peekable?
>

Perhaps you could read it into a stringstream.

namespace io = boost::iostreams;

io::filtering_istream in;
in.push(io::gzip_decompressor());
in.push(io::file_source(fileName.c_str(), std::ios_base::in |
std::ios_base::binary));
std::stringstream memStream;
memStream << in.rdbuf();


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk