20 #ifndef BEAST_NUDB_VARINT_H_INCLUDED
21 #define BEAST_NUDB_VARINT_H_INCLUDED
23 #include <nudb/detail/stream.hpp>
50 (8 *
sizeof(T) + 6) / 7;
56 template <
class =
void>
72 if (n == 1 && *p == 0)
92 T>::value>* =
nullptr>
106 template <
class =
void>
122 return p -
reinterpret_cast<
void read(nudb::detail::istream &is, std::size_t &u)
void write(nudb::detail::ostream &os, std::size_t t)
std::size_t read_varint(void const *buf, std::size_t buflen, std::size_t &t)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::size_t size_varint(T v)
std::size_t write_varint(void *p0, std::size_t v)