Skip to content

Main content

CBOR Additional Info Reserved Value Flag Tool

Compute cbor additional info reserved value flag from explicit bounded inputs.

Loading tool…

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

  1. Enter octet. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
octetOne numeric octet, from 0 through 255.Required. Safe integer; minimum 0; maximum 255.
Output fieldInterpretationReturned shape
majorTypeMajor TypeRequired. Safe integer.
additionalInfoAdditional InfoRequired. Safe integer.
reservedReservedRequired. Boolean.
indefiniteLow five bits equal 31; this label alone does not establish that the major type permits indefinite length.Required. Boolean.
json
{
  "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

  1. Calculation and input contract: decode/cbor-additional-info-reserved-value-flag — tool.io

  2. RFC 8949: Concise Binary Object Representation — RFC Editor

Similar or alternative tools