The encoding consists of the floor of maximum divided by the multiplier, minus the integer value divided by the multiplier, encoded as a Base-128 64-bit Little Endian variable-length unsigned integer.
More...
Public Attributes | |
| std::int64_t | maximum |
| The inclusive maximum value. | |
| std::uint64_t | multiplier |
| The multiplier value. | |
The encoding consists of the floor of maximum divided by the multiplier, minus the integer value divided by the multiplier, encoded as a Base-128 64-bit Little Endian variable-length unsigned integer.
| Option | Type | Description |
|---|---|---|
maximum | int | The inclusive maximum value |
multiplier | uint | The multiplier value |
| Condition | Description |
|---|---|
value <= maximum | The input value must be less than or equal to the maximum |
value % multiplier == 0 | The input value must be divisible by the multiplier |
Given the input value 5, where the maximum is 16 and the multiplier is 5, the encoding results in the Base-128 64-bit Little Endian variable-length unsigned integer 2: