52 const std::string &data = (std::string)bstring;
54 stream << str_len << data;
62 const std::streamsize data_len = length.
get<std::streamsize>();
65 ((std::string&)bstring) =
"";
69 std::vector<char> data(data_len);
70 stream.read(&data[0], data.size());
71 bstring.assign(&data[0], data.size());