|
@ -100,14 +100,6 @@ inline Slice ExtractUserKey(const Slice& internal_key) { |
|
|
return Slice(internal_key.data(), internal_key.size() - 8); |
|
|
return Slice(internal_key.data(), internal_key.size() - 8); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
inline ValueType ExtractValueType(const Slice& internal_key) { |
|
|
|
|
|
assert(internal_key.size() >= 8); |
|
|
|
|
|
const size_t n = internal_key.size(); |
|
|
|
|
|
uint64_t num = DecodeFixed64(internal_key.data() + n - 8); |
|
|
|
|
|
unsigned char c = num & 0xff; |
|
|
|
|
|
return static_cast<ValueType>(c); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// A comparator for internal keys that uses a specified comparator for |
|
|
// A comparator for internal keys that uses a specified comparator for |
|
|
// the user key portion and breaks ties by decreasing sequence number. |
|
|
// the user key portion and breaks ties by decreasing sequence number. |
|
|
class InternalKeyComparator : public Comparator { |
|
|
class InternalKeyComparator : public Comparator { |
|
|