The encoding consists of the length of the array minus minimum
encoded as a Base-128 64-bit Little Endian variable-length unsigned integer followed by the elements of the array encoded in order. The encoding of the element at index i
is either prefix_encodings[i]
if set, or encoding
.
More...
Public Attributes | |
const std::uint64_t | minimum |
The minimum length of the array. | |
const std::shared_ptr< Encoding > | encoding |
Element encoding. | |
const std::vector< Encoding > | prefix_encodings |
Positional encodings. | |
The encoding consists of the length of the array minus minimum
encoded as a Base-128 64-bit Little Endian variable-length unsigned integer followed by the elements of the array encoded in order. The encoding of the element at index i
is either prefix_encodings[i]
if set, or encoding
.
Option | Type | Description |
---|---|---|
minimum | uint | The minimum length of the array |
prefixEncodings | encoding[] | Positional encodings |
encoding | encoding | Element encoding |
Condition | Description |
---|---|
len(value) >= minimum | The length of the array must be greater than or equal to the minimum |
TODO: Give an example of an array with more than 8-bit of elements
Given the array [ true, false, 5 ]
where the minimum is 1, the prefixEncodings
corresponds to BYTE_CHOICE_INDEX with choices [ false, true ]
and BYTE_CHOICE_INDEX with choices [ false, true ]
and encoding
corresponds to BOUNDED_MULTIPLE_8BITS_ENUM_FIXED with minimum 0 and maximum 255, the encoding results in: