|
Boost Users : |
From: Aljaz (aljaz.fajmut_at_[hidden])
Date: 2007-04-29 07:39:43
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:
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?
Thank you very much for help
Regards
Aljaz
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net