21 #ifndef XAPIAN_INCLUDED_LENGTH_H 22 #define XAPIAN_INCLUDED_LENGTH_H 40 result +=
static_cast<unsigned char>(len);
45 unsigned char b =
static_cast<unsigned char>(len & 0x7f);
48 result += char(b | static_cast<unsigned char>(0x80));
64 void decode_length(
const char ** p,
const char *end,
unsigned & out);
66 void decode_length(
const char ** p,
const char *end,
unsigned long & out);
68 void decode_length(
const char ** p,
const char *end,
unsigned long long & out);
86 unsigned long long & out);
88 #endif // XAPIAN_INCLUDED_LENGTH_H void decode_length_and_check(const char **p, const char *end, unsigned &out)
Decode a length encoded by encode_length.
std::string encode_length(T len)
Encode a length as a variable-length string.
void decode_length(const char **p, const char *end, unsigned &out)
Decode a length encoded by encode_length.