GetSizeOfVarInt

Return the number of bytes the VarInt encoding of a value occupies.

Synopsis

Declared in <serialize.h>

template<
    VarIntMode Mode,
    typename I>
unsigned int
GetSizeOfVarInt(I n);

Return Value

The number of bytes its VarInt encoding occupies.

Parameters

NameDescription
nThe value that would be encoded as a VarInt.