[#GetSizeOfVarInt]
= GetSizeOfVarInt
:mrdocs:

Return the number of bytes the VarInt encoding of a value occupies&period;

== Synopsis

Declared in `&lt;serialize&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:VarIntMode.adoc[VarIntMode] Mode,
    typename I&gt;
unsigned int
GetSizeOfVarInt(I n);
----

== Return Value

The number of bytes its VarInt encoding occupies&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *n*
| The value that would be encoded as a VarInt&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
