Boost logo

Boost :

From: Marc VIALA (mviala_at_[hidden])
Date: 2006-03-22 13:29:59

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at