20#ifndef BEAST_NUDB_VARINT_H_INCLUDED
21#define BEAST_NUDB_VARINT_H_INCLUDED
23#include <nudb/detail/stream.hpp>
41template <class T, bool = std::is_unsigned<T>::value>
55template <
class =
void>
70 if (n == 1 && *p == 0)
88template <class T, std::enable_if_t<std::is_unsigned<T>::value>* =
nullptr>
101template <
class =
void>
119template <class T, std::enable_if_t<std::is_same<T, varint>::value>* =
nullptr>
132template <class T, std::enable_if_t<std::is_same<T, varint>::value>* =
nullptr>
std::size_t read_varint(void const *buf, std::size_t buflen, std::size_t &t)
std::size_t size_varint(T v)
void write(nudb::detail::ostream &os, std::size_t t)
void read(nudb::detail::istream &is, std::size_t &u)
std::size_t write_varint(void *p0, std::size_t v)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.