JSON BinPack 0.0.1
A space-efficient open-source binary JSON serialization format based on JSON Schema with both schema-driven and schema-less support.
 
Loading...
Searching...
No Matches
sourcemeta::jsonbinpack::ARBITRARY_MULTIPLE_ZIGZAG_VARINT Struct Reference

The encoding consists of the the integer value divided by the multiplier encoded as a ZigZag-encoded Base-128 64-bit Little Endian variable-length unsigned integer. More...

Public Attributes

std::uint64_t multiplier
 The multiplier value.
 

Detailed Description

The encoding consists of the the integer value divided by the multiplier encoded as a ZigZag-encoded Base-128 64-bit Little Endian variable-length unsigned integer.

Options

Option Type Description
multiplier uint The multiplier value

Conditions

Condition Description
value % multiplier == 0 The input value must be divisible by the multiplier

Examples

Given the input value 10, where the multiplier is 5, the encoding results in the Base-128 64-bit Little Endian variable-length unsigned integer 4:

+------+
| 0x04 |
+------+