Skip to content

createDelimitedCodec

createDelimitedCodec(delimiter, options?): Codec<Uint8Array<ArrayBufferLike>>

Defined in: packages/format-core/src/codecs/delimited-codec.ts:21

Creates a generic delimiter-terminated codec for binary payloads.

Use when values end in a fixed byte sequence that is not a newline, such as a NUL-terminated record stream. Use createDelimitedDecoder or createDelimitedEncoder directly where only one direction is needed.

Uint8Array

The byte sequence that terminates each value. Must not be empty.

DelimitedDecoderOptions

See DelimitedCodecOptions.

Codec<Uint8Array<ArrayBufferLike>>