Boost logo

Boost Users :

Subject: Re: [Boost-users] [iostreams] How can I use the Stream Insertion operator (<<) with a filtering_streambuf?
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2013-07-26 07:39:11


This is how I do it with file_sink:

boost::iostreams::filtering_ostream output_file;
output_file.push(boost::iostreams::bzip2_compressor(boost::iostreams::bzip2_params(9)));
output_file.push(boost::iostreams::file_sink("file.bz2",
std::ios_base::binary));
output_file<<"blalba";

I think if you do just this, nothing happen until output_file is
destroyed. So enclose in { }.

Frédéric


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