@endo/netstring
v1.0.7
Published
Implements a JavaScript async iterator protocol for consuming and producing binary netstrings.
Downloads
8,016
Keywords
Readme
netstring
This is an implementation of asynchronous streams framed as Netstrings.
A netstring is a binary protocol for length-prefixed frames,
using decimal strings as variable width integers.
For example, the frame 5:hello,
corresponds to the message hello
,
where 5
is the length of hello
in bytes.
This implementation relies particularly on the pure JavaScript notion of a
stream, using async iterators of Uint8Arrays.
By convention, these may be ranges of a ring buffer, so a stream owns a byte
range it receives from next
until the next time it calls next
.
Netstrings D. J. Bernstein, [email protected] 1997-02-01