Skip to content

Instantly share code, notes, and snippets.

@alibitek
Created March 18, 2013 14:33
Show Gist options
  • Save alibitek/5187565 to your computer and use it in GitHub Desktop.
Save alibitek/5187565 to your computer and use it in GitHub Desktop.
std::string GZipDecompressString(const std::string& compressedString)
{
std::stringstream src(compressedString);
if (src.good())
{
boost::iostreams::filtering_istreambuf in;
iostreams::gzip_params p;
in.push(boost::iostreams::gzip_decompressor());
in.push(src);
std::stringstream dst;
boost::iostreams::copy(in, dst);
return dst.str();
}
return "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment