| 28 | namespace table { |
| 29 | |
| 30 | void BlockHandle::EncodeTo(string* dst) const { |
| 31 | // Sanity check that all fields have been set |
| 32 | assert(offset_ != ~static_cast<uint64>(0)); |
| 33 | assert(size_ != ~static_cast<uint64>(0)); |
| 34 | core::PutVarint64(dst, offset_); |
| 35 | core::PutVarint64(dst, size_); |
| 36 | } |
| 37 | |
| 38 | Status BlockHandle::DecodeFrom(StringPiece* input) { |
| 39 | if (core::GetVarint64(input, &offset_) && core::GetVarint64(input, &size_)) { |
no test coverage detected