createNetstringDecoder
createNetstringDecoder(
options?):Decoder<Uint8Array<ArrayBufferLike>,Uint8Array<ArrayBufferLike>>
Defined in: packages/format-netstring/src/netstring/netstring-decoder.ts:50
Creates the netstring read half: length:payload, in, payload bytes out.
Length-field violations are reported as recoverable errors — the decoder knows exactly how many bytes to discard, so framing resynchronises — while a missing terminator is fatal, because at that point the declared length cannot be trusted and frame synchronisation is lost.
The single implementation of the netstring read grammar; every other read face in this package is driven by it.
Spec: https://cr.yp.to/proto/netstrings.txt
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Decoder<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>