14 Oct
2010
14 Oct
'10
4:36 a.m.
I know that I'm doing something stupid but it isn't obvious to me what. I'm trying to write a compressed file using: namespace BI = boost::iostreams; BI::filtering_ostream out; std::fstream mfile("test.gz", std::ios::binary|std::ios::out); out.push(BI::bzip2_compressor()); out.push(mfile); out << "This is a gz file" << endl; but when I do so, the file is always empty. Commenting out the push of the bzip2_compressor works like I'd expect. Any help for a newbie? Thanks B