Description
Inspect CBOR major type and additional-information category.
CBOR initial bytes combine major type and additional information. Some fields are reserved or context-dependent, and a break marker is meaningful only within a correctly tracked indefinite-length container.
Inspect CBOR major type and additional-information category.
When to use this tool
Use CBOR Additional Info Reserved Value Flag when inspecting one explicit CBOR field or supplied break context.
How to use the tool and how it works
- Enter octet. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read majorType, additionalInfo, reserved, indefinite. Inspect reserved, indefinite before interpreting the associated values.
Inspect CBOR major type and additional-information category. Require an octet; low five bits are additionalInfo, with reserved for 28-30 and indefinite for 31.1
CBOR splits the initial octet into major type and additional information. Reserved or indefinite forms need type and container context beyond a bit-field split.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| octet | One numeric octet, from 0 through 255. | Required. Safe integer; minimum 0; maximum 255. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| majorType | Major Type | Required. Safe integer. |
| additionalInfo | Additional Info | Required. Safe integer. |
| reserved | Reserved | Required. Boolean. |
| indefinite | Low five bits equal 31; this label alone does not establish that the major type permits indefinite length. | Required. Boolean. |
{
"input": {
"octet": 159
},
"output": {
"majorType": 4,
"additionalInfo": 31,
"reserved": false,
"indefinite": true
}
} Limitations and assumptions
- indefinite labels the bit field, not semantic permission for every major type or a complete break-context check.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete CBOR parser to track nesting, following arguments and type-specific validity.
References
Similar or alternative tools
- CBOR Simple Value Initial Octet
Inspect a supported CBOR simple-value initial octet.
- CBOR Break Context Token
Check a break octet against supplied container context.