|
Boost : |
From: Marc VIALA (mviala_at_[hidden])
Date: 2006-03-22 13:29:59
Hi,
I would like to manage the compression & decompression of wide stream. I
have already implemented this functionality for narrow stream by using
Boost.Iostream, see the code snippet hereafter, but I'm really too newbie
with this library to generalize with wide stream.
Any and all help appreciated?
<\code snippet>
// Compression of narrow stream
void compress(std::istream& is, std::ostream& os)
{
io::filtering_streambuf<io::output> out ;
out.push(io::gzip_compressor()) ;
out.push(os) ;
io::copy(is, out) ;
}
// Decompression of narrow stream
void decompress(std::istream& is, std::ostream& os)
{
io::filtering_streambuf<io::input> in ;
in.push(io::gzip_decompressor()) ;
in.push(is) ;
io::copy(in, os) ;
}
<\code snippet>
Marc Viala
mviala_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk