Keep definite and indefinite lengths distinct
Item_Length represents a definite or indefinite length. Its Kind function reports which form it has. A definite string length counts encoded payload octets. An array length counts child items, and a map length counts pairs.
Convert only after range checking
An unsigned integer stores its raw argument. A negative integer stores the raw argument n for the mathematical value −1−n. This representation covers the full CBOR range without narrowing.
Instantiate Signed_Integers or Unsigned_Integers for the target Ada type. Conversion reports below-range, above-range, or negative-value status instead of wrapping or truncating.
Inspect width and bits exactly
Float_Value retains binary16, binary32, or binary64 width and its exact encoded bits. Its category reports finite, positive infinity, negative infinity, or NaN.
Numbers.Binary64 promotes finite values of every width to binary64 interchange bits. For nonfinite values, it exposes only a category, so the package makes no NaN payload or signaling-state promise.