Hello
I've been trying to figure out another way to compress data from/to std::stringstream.
Here is the source how I do it now:
Code:
std::stringstream decompressed;
decompressed << "somestring.....";
std::stringstream compressed;
{
boost::iostreams::filtering_streambuf<boost::iostreams::input> out;
out.push(boost::iostreams::zlib_compressor());
out.push(decompressed);
boost::iostreams::copy(out, compressed);
}
Is there any way around this?
I want to avoid boost::iostreams::copy because it takes 40% of this source execution time.
How can I compress data directly to stringstream (to compressed in this example) without copying it?
PS: i tried asking on boost user newsgroups, but noone replies
Thank you very much for help