Description
Inspect a supported CBOR simple-value initial octet.
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 a supported CBOR simple-value initial octet.
When to use this tool
Use CBOR Simple Value Initial Octet 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 simpleValue, followingByte. Inspect followingByte before interpreting the associated values.
Inspect a supported CBOR simple-value initial octet. Require whole octet in [224,248]; return simpleValue = octet-224 except 248 returns -1 and followingByte = true.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| octet | One numeric octet, from 0 through 255. | Required. Safe integer; minimum 224; maximum 248. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| simpleValue | Immediate simple value, or -1 when followingByte is true. | Required. Safe integer. |
| followingByte | True for initial octet 248; the next byte is not read or validated. | Required. Boolean. |
{
"input": {
"octet": 245
},
"output": {
"simpleValue": 21,
"followingByte": false
}
} Limitations and assumptions
- The following byte for 248 is not read; reserved following values and full item validity are separate checks.
- 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.