Another note on lengths and reading
This commit is contained in:
parent
d6b0b8bbd8
commit
cc97b6150c
|
@ -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)`
|
needed to unambiguously identify the value and its sign. `intbytes(0)`
|
||||||
is the empty byte sequence.
|
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
|
**Annotations.** To annotate a `Repr` `r` (that *MUST NOT* itself
|
||||||
already be annotated) with some sequence of `Value`s `[v_1, ..., v_m]`,
|
already be annotated) with some sequence of `Value`s `[v_1, ..., v_m]`,
|
||||||
surround `r` as follows:
|
surround `r` as follows:
|
||||||
|
|
Loading…
Reference in New Issue