Open
Description
From what I understand, there are 3 ways to deal with dynamically growing arrays or data in CBOR:
- Define an array with a specific length and update the length encoding of the array when a new element is added.
- Define an indefinite array with terminator byte.
- Define an array with an estimated/foreknown maximum length and fill unused entries with
null
.
My problem with solution 1 is, that the number of bytes of the length encoding may change when the array size exceeds specific limits (e.g. 23/24 or 255/256 I think), Is there another way to encode the length of the array, ensuring that the number of bytes of the length encoding remains constand (e.g. always 4 bytes for encoding the length of the array)?
Metadata
Metadata
Assignees
Labels
No labels