MCPcopy Create free account
hub / github.com/baidu/tera / EncodeTo

Method EncodeTo

src/leveldb/table/format.cc:28–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace leveldb {
27
28void BlockHandle::EncodeTo(std::string* dst) const {
29 // Sanity check that all fields have been set
30 assert(offset_ != ~static_cast<uint64_t>(0));
31 assert(size_ != ~static_cast<uint64_t>(0));
32 PutVarint64(dst, offset_);
33 PutVarint64(dst, size_);
34}
35
36Status BlockHandle::DecodeFrom(Slice* input) {
37 if (GetVarint64(input, &offset_) && GetVarint64(input, &size_)) {

Callers 2

AddMethod · 0.45
FinishMethod · 0.45

Calls 3

PutVarint64Function · 0.85
PutFixed32Function · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected