| 400 | } |
| 401 | |
| 402 | void 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 | |
| 418 | void MeasureFile(const char* fname) { |
| 419 | std::string fullinput; |
no test coverage detected