I'm trying to learn Google's c++ compression library Snappy. It requires that data be loaded into an std::string to compress or decompress it. How can I go about opening a file and loading the data into an std::string. Thanks.
Push binary contents of file to std::string for use with Google's Snappy
438 views Asked by Kahless At
1
Check the Unit tests of Snappy library. There is a
GetContent
function that loads binary data into the string. Also you can check how it's used for data compression there.