| 26 | namespace leveldb { |
| 27 | |
| 28 | void 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 | |
| 36 | Status BlockHandle::DecodeFrom(Slice* input) { |
| 37 | if (GetVarint64(input, &offset_) && GetVarint64(input, &size_)) { |
no test coverage detected