I have stringstream object. It is filled through
stringstream ss;
boost::iostreams::copy(inp,ss);
from
boost::iostreams::filtering_streambuf<boost::iostreams::input> inp;
and actually holds ungzipped file within.
Now if i flush stringstream content to file with
std::ofstream ofs(path_to_file,std::ios_base::out|std::ios_base::binary);
ofs << ss.rdbuf();
everything is ok. File is filled with complete correct data.
But if i instead of flushing to file construct string like this
std::string s = ss.str();
content is truncated somewhere in the middle. It is not a persistent error, and it obviously depends on content of string buffer.
The content is HTML file in several languages.
What can it be? Thanks.