1. 程式人生 > >C++壓縮解壓之snappy

C++壓縮解壓之snappy

To use Snappy from your own C++ program, include the file "snappy.h" from your calling file, and link against the compiled library.

There are many ways to call Snappy, but the simplest possible is

snappy::Compress(input.data(), input.size(), &output);
snappy::Uncompress(input.data(), input.size(), &output);

where "input" and "output" are both instances of std::string.