MCPcopy Create free account
hub / github.com/ElementsProject/elements / EncodeTo

Method EncodeTo

src/leveldb/table/format.cc:15–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace leveldb {
14
15void BlockHandle::EncodeTo(std::string* dst) const {
16 // Sanity check that all fields have been set
17 assert(offset_ != ~static_cast<uint64_t>(0));
18 assert(size_ != ~static_cast<uint64_t>(0));
19 PutVarint64(dst, offset_);
20 PutVarint64(dst, size_);
21}
22
23Status BlockHandle::DecodeFrom(Slice* input) {
24 if (GetVarint64(input, &offset_) && GetVarint64(input, &size_)) {

Callers 2

AddMethod · 0.45
FinishMethod · 0.45

Calls 4

PutVarint64Function · 0.85
PutFixed32Function · 0.85
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected