about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-06-06 14:08:27 +0200
committerProfpatsch <mail@profpatsch.de>2020-06-06 14:14:44 +0200
commit5a00ff789c15ed27009d3a84341e17c293623112 (patch)
tree108f6da96e8df941b72cf48d95a1fe66854c68e7 /pkgs/games
parent75eb816a6372518b6c047a266089875a358e9517 (diff)
pkgs/profpatsch/netencode: add shallow parser
The “shallow” parser uses the fact that every netencode value is
length-encoded (or a scalar with a fixed length).
It does not need to parse the inner values in order to get the
structure of the thing.

That means that we can implement very fast structure-based operations,
like “take the first 5 elements of a list” or “get the record value
with the key name `foo`”.

We can even do things like intersperse elements into a list of values
and write the resulting netencode structure to a socket, without ever
needing to copy the data (it’s all length-indexed pointers to bytes).
Diffstat (limited to 'pkgs/games')
0 files changed, 0 insertions, 0 deletions