GeoDesk for C++
Fast and storage-efficient spatial database engine for OpenStreetMap features
Loading...
Searching...
No Matches
varint.h File Reference
#include <cassert>
#include <cstdint>
#include <string_view>
#include <clarisma/util/Bits.h>

Go to the source code of this file.

Namespaces

namespace  clarisma
 

Functions

uint64_t clarisma::readVarint35 (const uint8_t *&p)
 
uint32_t clarisma::readVarint32 (const uint8_t *&p)
 
uint64_t clarisma::readVarint64 (const uint8_t *&p)
 
int32_t clarisma::readSignedVarint32 (const uint8_t *&p)
 
int64_t clarisma::readSignedVarint64 (const uint8_t *&p)
 
std::string_view clarisma::readStringView (const uint8_t *&p)
 
int clarisma::countVarints (const void *pStart, const void *pEnd)
 
void clarisma::skipVarints (const uint8_t *&p, int count)
 
void clarisma::skipVarintsBackwardUnsafe (const uint8_t *&p, int count)
 Moves pointer backward, skipping over the specified numbers of varints.
 
void clarisma::writeVarint (uint8_t *&p, uint64_t val)
 
void clarisma::writeSignedVarint (uint8_t *&p, int64_t val)
 
unsigned int clarisma::varintSize (uint64_t v)
 Returns the number of bytes required to encode the given unsigned value as a varint (A varint requires one byte for each complete or partial run of 7 significant bits)
 
uint64_t clarisma::toZigzag (int64_t v)
 
uint32_t clarisma::toZigzag (int32_t v)
 
int64_t clarisma::fromZigzag (uint64_t v)
 
int32_t clarisma::fromZigzag (uint32_t v)