[#VarIntMode]
= VarIntMode
:mrdocs:

Mode for encoding VarInts&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
enum class VarIntMode : int;
----

== Description

Currently there is no support for signed encodings&period; The default mode will not compile with signed values, and the legacy &quot;nonnegative signed&quot; mode will accept signed values, but improperly encode and decode them if they are negative&period; In the future, the DEFAULT mode could be extended to support negative numbers in a backwards compatible way, and additional modes could be added to support different varint formats (e&period;g&period; zigzag encoding)&period;

== Members

[cols="1,4"]
|===
| Name| Description
| `DEFAULT` 
| Requires an unsigned type&semi; the standard VarInt encoding&period;
| `NONNEGATIVE&lowbar;SIGNED` 
| Legacy mode accepting signed types, valid only for non&hyphen;negative values&period;
|===



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