iostreams and compression
29 Apr
2007
29 Apr
'07
11:39 a.m.
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_streambufboost::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
6422
Age (days ago)
6422
Last active (days ago)
0 comments
1 participants
participants (1)
-
Aljaz