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

Function UncompressFile

snappy_test_tool.cc:402–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402void UncompressFile(const char* fname) {
403 std::string fullinput;
404 CHECK_OK(file::GetContents(fname, &fullinput, file::Defaults()));
405
406 size_t uncompLength;
407 CHECK(snappy::GetUncompressedLength(fullinput.data(), fullinput.size(),
408 &uncompLength));
409
410 std::string uncompressed;
411 uncompressed.resize(uncompLength);
412 CHECK(snappy::Uncompress(fullinput.data(), fullinput.size(), &uncompressed));
413
414 CHECK_OK(file::SetContents(std::string(fname).append(".uncomp"), uncompressed,
415 file::Defaults()));
416}
417
418void MeasureFile(const char* fname) {
419 std::string fullinput;

Callers 1

mainFunction · 0.85

Calls 6

GetContentsFunction · 0.85
GetUncompressedLengthFunction · 0.85
SetContentsFunction · 0.85
dataMethod · 0.80
sizeMethod · 0.80
UncompressFunction · 0.70

Tested by

no test coverage detected