Description
Check a break octet against supplied container context.
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.
Check a break octet against supplied container context.
When to use this tool
Use CBOR Break Context Token when inspecting one explicit CBOR field or supplied break context.
How to use the tool and how it works
- Enter octet, container, indefinite, expectingMapValue. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read isBreak, permitted. Inspect isBreak, permitted before interpreting the associated values.
Check a break octet against supplied container context. Require a supported container label; isBreak tests 255, and permitted additionally requires indefinite length, a non-none container and no pending map value.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. |
| container | Container | Required. Text; one of "array", "map", "bytes", "text", "none"; maximum UTF-16 length 8192. |
| indefinite | Indefinite | Required. Boolean. |
| expectingMapValue | Expecting Map Value | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| isBreak | Is Break | Required. Boolean. |
| permitted | Local context predicate for octet 255; requires suitable indefinite container and no outstanding map value. | Required. Boolean. |
{
"input": {
"octet": 255,
"container": "map",
"indefinite": true,
"expectingMapValue": false
},
"output": {
"isBreak": true,
"permitted": true
}
} Limitations and assumptions
- Context is supplied and may be inconsistent; this is not a full nested CBOR parser.
- 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
- Decoding: CBOR Initial Byte Fields
Split any initial octet into CBOR fields and a reserved-value flag.
- CBOR Additional Info Reserved Value Flag
Inspect CBOR major type and additional-information category.