Jim Schaad wrote: > Using the terminology of CDDL, this is really unsigned or negative.
(This is actually CBOR terminology that CDDL just inherits. These terms would be in use even without using CDDL.) > Specifically, it would be the union of uint (unsigned - 0 and above) and > nint (negative integer strictly less than 0). Both of these types have > different major types so they are coded differently. Exactly. Grüße, Carsten (CBOR background: unsigned numbers are much more frequent in constrained environments than signed ones, so they are major type 0. Signed numbers are coded similar to the way they are in protobuf, except that we got rid of the shifting to put the sign bit somewhere and instead just added major type 1 to indicate a negative. So we have unsigned (0..) and negative (..-1) as separate major types.) _______________________________________________ COSE mailing list [email protected] https://www.ietf.org/mailman/listinfo/cose
