Skip to content

Commit

Permalink
tunneling docs updated: reading till eof
Browse files Browse the repository at this point in the history
  • Loading branch information
arekbulski committed Feb 4, 2021
1 parent 15a7fff commit 1e0aa1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tunneling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Working with bytes subsets
--------------------------------------------

Greedy* constructs consume as much data as possible. This is convenient when building from a list of unknown length but becomes a problem when parsing it back and the list needs to be separated from following data. This can be achieved either by prepending a byte count (see Prefixed) or by prepending an element count (see PrefixedArray):
Greedy* constructs consume as much data as possible, they read until EOF. This is convenient when building from a list of unknown length but becomes a problem when parsing it back and the list needs to be separated from following data. This can be achieved either by prepending a byte count (see Prefixed) or by prepending an element count (see PrefixedArray):

VarInt encoding is recommended because it is both compact and never overflows. Also and optionally, the length field can include its own size. If so, length field must be of fixed size.

Expand Down

0 comments on commit 1e0aa1a

Please sign in to comment.