| 13 | namespace leveldb { |
| 14 | |
| 15 | void 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 | |
| 23 | Status BlockHandle::DecodeFrom(Slice* input) { |
| 24 | if (GetVarint64(input, &offset_) && GetVarint64(input, &size_)) { |
no test coverage detected