Clarification
This commit is contained in:
parent
666f8e1643
commit
894000a54f
|
@ -8,7 +8,10 @@ June 2022. Version 0.7.0.
|
||||||
|
|
||||||
## Machine-Oriented Binary Syntax
|
## Machine-Oriented Binary Syntax
|
||||||
|
|
||||||
For a value `v`, we write `«v»` for the binary encoding of `v`.
|
For a value `v`, we write `«v»` for the binary encoding of `v`. The
|
||||||
|
length of an encoding is always available from context: either from
|
||||||
|
a containing encoded value, or from the overall container of the data,
|
||||||
|
which could be a file, an HTTP message, a UDP packet, etc.
|
||||||
|
|
||||||
«#f» = [0xA0]
|
«#f» = [0xA0]
|
||||||
«#t» = [0xA1]
|
«#t» = [0xA1]
|
||||||
|
|
|
@ -29,8 +29,10 @@ Each `Repr` starts with a tag byte, describing the kind of information
|
||||||
represented.
|
represented.
|
||||||
|
|
||||||
However, inspired by [argdata][], a `Repr` does *not* describe its own
|
However, inspired by [argdata][], a `Repr` does *not* describe its own
|
||||||
length. Instead, the surrounding context must supply the expected length
|
length. Instead, the expected length of the `Repr` is always available
|
||||||
of the `Repr`.
|
from the surrounding context: either from a containing encoded value, or
|
||||||
|
from the overall container of the data, which could be a file, an HTTP
|
||||||
|
message, a UDP packet, etc.
|
||||||
|
|
||||||
As a consequence, `Repr`s for `Compound` values store the lengths of
|
As a consequence, `Repr`s for `Compound` values store the lengths of
|
||||||
their contained values. Each contained `Value` is represented as a
|
their contained values. Each contained `Value` is represented as a
|
||||||
|
|
Loading…
Reference in New Issue