Dear Ladies and Gentlemen,
I continue to work at our CDMI implementation at the moment and I have seen something where I feel a bit unsure.
The CDMI v1.0.2 specification of ISO/IEC tells:
"The native format of an object ID is a variable-length byte sequence and shall be a maximum length of 40 bytes."
I understood all rules how to build that variable-length byte sequence already and I built such a sequence already.
The CDMI v1.0.2 specification also tells:
"The native format for an object ID is binary. When necessary, such as when included in URIs and JSON strings, the object ID textual representation shall be encoded using base 16 encoding rules described in RFC 4648 and shall be case insensitive."
An example for the textual representation of the object ID is shown in the CDMI v1.0.2 specification as:
<< The textual representation of the object ID has a length of 32
here, some other examples in the specification show that the textual
representation of such an object ID is not longer than 40 hex characters
If I convert the native format of an object ID (binary) with the maximum length of 40 bytes to the textual representation (hex), I receive a string with a length of 80 characters (or bytes).
I know the reason for it, because a "1 byte = 8 bits = (binary) 11111111 = (decimal) 255" is equal "hex = 0xff". that means that every single binary byte needs two bytes for the textual representation as hex string then, which should explain why the textual representation has the double length of the binary representation. I don't see an error here at the moment, I only wondered that it is so long then.
I just wanted to go sure and wanted to ask if it is correct if it is known that the object ID textual representation might be up to 80 bytes or 80 characters long, or if I have mistunderstood something here.
Many thanks in advance,