22 #ifndef HYPERTABLE_SERIALIZEDKEY_H
23 #define HYPERTABLE_SERIALIZEDKEY_H
37 const uint8_t *ptr1, *ptr2;
43 if (*ptr1 >= 0x80 && *ptr1 != 0xD0)
45 if (*ptr2 >= 0x80 && *ptr2 != 0xD0)
48 int len = (len1 < len2) ? len1 : len2;
49 int cmp = memcmp(ptr1+1, ptr2+1, len-1);
50 return (cmp==0) ? len1 - len2 : cmp;
53 const char *
row()
const {
54 const uint8_t *rptr =
ptr;
56 return (
const char *)rptr+1;
87 #endif // HYPERTABLE_SERIALIZEDKEY_H
bool operator<=(const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y)
SerializedKey(const uint8_t *buf)
A class managing one or more serializable ByteStrings.
Logging routines and macros.
bool operator==(const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs)
int compare(const SerializedKey sk) const
bool operator!=(const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs)
const uint8_t * ptr
The pointer to the serialized data.
bool operator<(const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs)
bool operator>=(const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y)
size_t decode_length(const uint8_t **dptr) const
Retrieves the decoded length and returns a pointer to the string.
A serializable ByteString.
SerializedKey(ByteString bs)
uint32_t decode_vi32(const uint8_t **bufp, size_t *remainp)
Decode a variable length encoded integer up to 32-bit.
bool operator>(const directory< _Key, _Tp, _Compare, _Allocator > &__x, const directory< _Key, _Tp, _Compare, _Allocator > &__y)