Kit
Functions

addDecoderSentinel

Call Signature

addDecoderSentinel<TTo>(decoder, sentinel): FixedSizeDecoder<TTo>

Creates a decoder that continues reading until a given Uint8Array sentinel is found.

See addCodecSentinel for more information.

Type Parameters

Type ParameterDescription
TToThe type of the decoded value.

Parameters

ParameterType
decoderFixedSizeDecoder<TTo>
sentinelReadonlyUint8Array

Returns

FixedSizeDecoder<TTo>

See

addCodecSentinel

Call Signature

addDecoderSentinel<TTo>(decoder, sentinel): VariableSizeDecoder<TTo>

Creates a decoder that continues reading until a given Uint8Array sentinel is found.

See addCodecSentinel for more information.

Type Parameters

Type ParameterDescription
TToThe type of the decoded value.

Parameters

ParameterType
decoderDecoder<TTo>
sentinelReadonlyUint8Array

Returns

VariableSizeDecoder<TTo>

See

addCodecSentinel

On this page