
2 Apr
2007
2 Apr
'07
1:42 p.m.
gchen <chengang31 <at> gmail.com> writes:
Try this:
boost::iostreams::filtering_streambuf<boost::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.