varint.hpp File Reference

Contains low-level varint and zigzag encoding and decoding functions. More...

`#include <protozero/exception.hpp>`
`#include <cstdint>`
Include dependency graph for varint.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

| protozero
| All parts of the protozero header-only library are in this namespace.

## Functions

uint64_t | protozero::decode_varint (const char **data, const char *end)
void | protozero::skip_varint (const char **data, const char *end)
template<typename T >
int | protozero::write_varint (T data, uint64_t value)
int | protozero::length_of_varint (uint64_t value) noexcept
constexpr uint32_t | protozero::encode_zigzag32 (int32_t value) noexcept
constexpr uint64_t | protozero::encode_zigzag64 (int64_t value) noexcept
constexpr int32_t | protozero::decode_zigzag32 (uint32_t value) noexcept
constexpr int64_t | protozero::decode_zigzag64 (uint64_t value) noexcept

## Variables

constexpr const int8_t | protozero::max_varint_length = sizeof(uint64_t) * 8 / 7 + 1

## Detailed Description

Contains low-level varint and zigzag encoding and decoding functions.