The encoding consists of maximum
minus the byte-length of the string plus 1 as a Base-128 64-bit Little Endian variable-length unsigned integer followed by the UTF-8 encoding of the input value.
More...
Public Attributes | |
const std::uint64_t | maximum |
The inclusive maximum string UTF-8 byte-length. | |
The encoding consists of maximum
minus the byte-length of the string plus 1 as a Base-128 64-bit Little Endian variable-length unsigned integer followed by the UTF-8 encoding of the input value.
Optionally, if the input string has already been encoded to the buffer using UTF-8, the encoding may consist of the byte constant 0x00
followed by maximum
minus the byte-length of the string plus 1 as a Base-128 64-bit Little Endian variable-length unsigned integer, followed by the current offset minus the offset to the start of the UTF-8 string value in the buffer encoded as a Base-128 64-bit Little Endian variable-length unsigned integer.
Option | Type | Description |
---|---|---|
maximum | uint | The inclusive maximum string UTF-8 byte-length |
Condition | Description |
---|---|
len(value) <= maximum | The input string byte-length is equal to or less than the maximum |
Given the input string foo
with a maximum 4 where the string has not been previously encoded, the encoding results in:
Given the encoding of foo
with a maximum of 3 followed by the encoding of foo
with a maximum of 5, the encoding may result in: