-1

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.

Kahless
  • 1,113
  • 2
  • 11
  • 30

1 Answers1

0

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.

Nikita
  • 5,966
  • 2
  • 23
  • 35