46 const char * p = data.data();
47 const char * end = p + data.size();
57 doclen_ubound += wdf_ubound;
77 pack_uint(data, doclen_ubound - wdf_ubound);
Chert class for database statistics.
static const string DATABASE_STATS_KEY(1, '\0')
The key in the postlist table which we use to store our encoded statistics.
void read(ChertPostListTable &postlist_table)
void pack_uint_last(std::string &s, U value)
Append an encoded unsigned integer to a string as the last item.
bool get_exact_entry(const std::string &key, std::string &tag) const
Read an entry from the table, if and only if it is exactly that being asked for.
DatabaseCorruptError indicates database corruption was detected.
void add(const std::string &key, std::string tag, bool already_compressed=false)
Add a key/tag pair to the table, replacing any existing pair with the same key.
void pack_uint(std::string &s, U value)
Append an encoded unsigned integer to a string.
Postlists in chert databases.
bool unpack_uint_last(const char **p, const char *end, U *result)
Decode an unsigned integer as the last item in a string.
bool unpack_uint(const char **p, const char *end, U *result)
Decode an unsigned integer from a string.
void write(ChertPostListTable &postlist_table) const