Indefinite lengths
03Some strings and containers can end with a break code rather than carrying a known length.
FF completes the array [1,2].
Key idea: Indefinite-length forms exist for byte/text strings, arrays, and maps.
Rules & examples
Indefinite-length forms exist for byte/text strings, arrays, and maps.
- Indefinite-length forms exist for byte/text strings, arrays, and maps.
- FF terminates the permitted indefinite-length item; it is not a general standalone value.
- Map content still requires complete key/value pairs.
Examples are illustrative. Consult the linked RFC and its errata for implementation details.
Sources
New to this? Start hereA quick picture + helpful background
First, agree how to read the message.
An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.