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::FLOOR_MULTIPLE_ENUM_VARINT Struct Reference

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

Public Attributes

std::int64_t minimum
 The inclusive minimum value.
 
std::uint64_t multiplier
 The multiplier value.
 

Detailed Description

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

Options

Option Type Description
minimum int The inclusive minimum value
multiplier uint The multiplier value

Conditions

Condition Description
value >= minimum The input value must be greater than or equal to the minimum
value % multiplier == 0 The input value must be divisible by the multiplier

Examples

Given the input value 1000, where the minimum is -2 and the multiplier is 4, the encoding results in the Base-128 64-bit Little Endian variable-length unsigned integer 250:

+------+------+
| 0xfa | 0x01 |
+------+------+