MCPcopy Create free account
hub / github.com/chen3feng/toft / EncodeToString

Method EncodeToString

storage/sstable/hfile/file_trailer.cpp:39–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39const std::string FileTrailer::EncodeToString() const {
40 std::string result(kTrailerBlockMagic);
41 PutFixed64(&result, file_info_offset_);
42 PutFixed64(&result, data_index_offset_);
43 PutFixed32(&result, data_index_count_);
44 PutFixed64(&result, meta_index_offset_);
45 PutFixed32(&result, meta_index_count_);
46 PutFixed64(&result, total_uncompressed_bytes_);
47 PutFixed32(&result, entry_count_);
48 PutFixed32(&result, compress_type_);
49 PutFixed32(&result, version_);
50 return result;
51}
52
53bool FileTrailer::DecodeFromString(const std::string &str) {
54 if (str.size() != static_cast<std::string::size_type>(TrailerSize())) {

Callers

nothing calls this directly

Calls 2

PutFixed64Function · 0.85
PutFixed32Function · 0.85

Tested by

no test coverage detected