2 Apr
2007
2 Apr
'07
7:42 p.m.
gchen
Try this:
boost::iostreams::filtering_streambufboost::iostreams::output > outStream; outStream.push(boost::iostreams::gzip_compressor()); outStream.push(boost::iostreams::file_sink("c:\\test.gz", std::ios::binary)); boost::iostreams::copy(sStream, outStream);
At your suggestion, I replaced both the std::ifStream and std::ofStream with boost::iostreams::file_source and boost::iostreams::file_sink respectively. The results are the same.