Blaze 0.0.1
The ultra high-performance JSON Schema evaluator
Loading...
Searching...
No Matches
Any Encodings

Classes

struct  sourcemeta::blaze::BYTE_CHOICE_INDEX
 The encoding consists of an index to the enumeration choices encoded as an 8-bit fixed-length unsigned integer. More...
struct  sourcemeta::blaze::LARGE_CHOICE_INDEX
 The encoding consists of an index to the enumeration choices encoded as a Base-128 64-bit Little Endian variable-length unsigned integer. More...
struct  sourcemeta::blaze::TOP_LEVEL_BYTE_CHOICE_INDEX
 If the input value corresponds to the index 0 to the enumeration choices, the encoding stores no data. Otherwise, the encoding consists of an index to the enumeration choices minus 1 encoded as an 8-bit fixed-length unsigned integer. More...
struct  sourcemeta::blaze::CONST_NONE
 The constant input value is not encoded. More...
struct  sourcemeta::blaze::ANY_PACKED_TYPE_TAG_BYTE_PREFIX

Detailed Description


Class Documentation

◆ sourcemeta::blaze::BYTE_CHOICE_INDEX

struct sourcemeta::blaze::BYTE_CHOICE_INDEX

The encoding consists of an index to the enumeration choices encoded as an 8-bit fixed-length unsigned integer.

Options

Option Type Description
choices any[] The set of choice values

Conditions

Condition Description
len(choices) > 0 The choices array must not be empty
len(choices) < 2 ** 8 The number of choices must be representable in 8 bits
value in choices The input value must be included in the set of choices

Examples

Given an enumeration [ "foo", "bar", "baz" ] and an input value "bar", the encoding results in the unsigned 8 bit integer 1:

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

Given an enumeration [ "foo", "bar", "baz" ] and an input value "foo", the encoding results in the unsigned 8 bit integer 0:

+------+
| 0x00 |
+------+

Public Attributes

std::vector< sourcemeta::core::JSON > choices
 The set of choice values.

◆ sourcemeta::blaze::LARGE_CHOICE_INDEX

struct sourcemeta::blaze::LARGE_CHOICE_INDEX

The encoding consists of an index to the enumeration choices encoded as a Base-128 64-bit Little Endian variable-length unsigned integer.

Options

Option Type Description
choices any[] The set of choice values

Conditions

Condition Description
len(choices) > 0 The choices array must not be empty
value in choices The input value must be included in the set of choices

Examples

Given an enumeration with 1000 members and an input value that equals the 300th enumeration value, the encoding results in the Base-128 64-bit Little Endian variable-length unsigned integer 300:

+------+------+
| 0xac | 0x02 |
+------+------+

Public Attributes

std::vector< sourcemeta::core::JSON > choices
 The set of choice values.

◆ sourcemeta::blaze::TOP_LEVEL_BYTE_CHOICE_INDEX

struct sourcemeta::blaze::TOP_LEVEL_BYTE_CHOICE_INDEX

If the input value corresponds to the index 0 to the enumeration choices, the encoding stores no data. Otherwise, the encoding consists of an index to the enumeration choices minus 1 encoded as an 8-bit fixed-length unsigned integer.

Options

Option Type Description
choices any[] The set of choice values

Conditions

Condition Description
len(choices) > 0 The choices array must not be empty
len(choices) < 2 ** 8 The number of choices must be representable in 8 bits
value in choices The input value must be included in the set of choices

Examples

Given an enumeration [ "foo", "bar", "baz" ] and an input value "bar", the encoding results in the unsigned 8 bit integer 0:

+------+
| 0x00 |
+------+

Given an enumeration [ "foo", "bar", "baz" ] and an input value "foo", the value is not encoded.

Public Attributes

std::vector< sourcemeta::core::JSON > choices
 The set of choice values.

◆ sourcemeta::blaze::CONST_NONE

struct sourcemeta::blaze::CONST_NONE

The constant input value is not encoded.

Options

Option Type Description
value any The constant value

Conditions

None

Examples

The input value that matches the value option is not encoded.

Public Attributes

sourcemeta::core::JSON value
 The constant value.

◆ sourcemeta::blaze::ANY_PACKED_TYPE_TAG_BYTE_PREFIX

struct sourcemeta::blaze::ANY_PACKED_TYPE_TAG_BYTE_PREFIX