Another note on lengths and reading

This commit is contained in:
Tony Garnock-Jones 2022-06-11 11:24:11 +02:00
parent d6b0b8bbd8
commit cc97b6150c
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ binary representation of `x`, taking exactly as many whole bytes as
needed to unambiguously identify the value and its sign. `intbytes(0)`
is the empty byte sequence.
When reading, the length of the input is supplied externally. This means
that, when reading a length/value pair in a `seq()`, each length should
be passed down to the decoder for the corresponding value, so that the
decoder knows when to stop.
**Annotations.** To annotate a `Repr` `r` (that *MUST NOT* itself
already be annotated) with some sequence of `Value`s `[v_1, ..., v_m]`,
surround `r` as follows: