Skip to content

encodeNetstring

encodeNetstring(data): Uint8Array

Defined in: packages/format-netstring/src/netstring/netstring-encoder.ts:34

Encodes a single netstring frame (length:payload,) into one contiguous buffer. Strings are treated as UTF-8.

A utility over the same framing the encoder emits, not a second implementation: it only concatenates the vectored parts.

string | Uint8Array<ArrayBufferLike>

Uint8Array