MCPcopy Create free account
hub / github.com/google/snappy / CompressFile

Function CompressFile

snappy_test_tool.cc:391–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void CompressFile(const char* fname) {
392 std::string fullinput;
393 CHECK_OK(file::GetContents(fname, &fullinput, file::Defaults()));
394
395 std::string compressed;
396 Compress(fullinput.data(), fullinput.size(), SNAPPY, &compressed, false);
397
398 CHECK_OK(file::SetContents(std::string(fname).append(".comp"), compressed,
399 file::Defaults()));
400}
401
402void UncompressFile(const char* fname) {
403 std::string fullinput;

Callers 1

mainFunction · 0.85

Calls 5

GetContentsFunction · 0.85
SetContentsFunction · 0.85
dataMethod · 0.80
sizeMethod · 0.80
CompressFunction · 0.70

Tested by

no test coverage detected