Created
March 13, 2013 09:52
-
-
Save daleobrien/5150658 to your computer and use it in GitHub Desktop.
gzip decompression, in memory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace io = boost::iostreams; //<-- good practicetypedef | |
std::vector<char> buffer_t; | |
void CompressionUtils::Inflate(const buffer_t &compressed, buffer_t &decompressed){ | |
io::filtering_ostream os; | |
os.push(io::gzip_decompressor()); | |
os.push(io::back_inserter(decompressed)); | |
io::write(os, &compressed[0], compressed.size()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment