#include #include #include #include int main(int argc, char **argv) { std::ifstream ifile("/tmp/input", std::ios_base::in | std::ios_base::binary); std::ofstream ofile("/tmp/output", std::ios_base::out | std::ios_base::binary); // This never outputs anything //boost::iostreams::filtering_stream stream; //stream.push(boost::iostreams::bzip2_compressor()); //stream.push(ifile); //boost::iostreams::copy(stream, ofile); boost::iostreams::filtering_stream stream; stream.push(boost::iostreams::bzip2_compressor()); stream.push(ofile); boost::iostreams::copy(ifile, stream); return 0; }