addEncoderSizePrefix

Call Signature

function addEncoderSizePrefix<TFrom>(
    encoder,
    prefix,
): FixedSizeEncoder<TFrom>;

Stores the size of the encoder in bytes as a prefix using the prefix encoder.

See addCodecSizePrefix for more information.

Type Parameters

Type ParameterDescription
TFromThe type of the value to encode.

Parameters

ParameterType
encoderFixedSizeEncoder<TFrom>
prefixFixedSizeNumberEncoder

Returns

FixedSizeEncoder<TFrom>

See

addCodecSizePrefix

Call Signature

function addEncoderSizePrefix<TFrom>(
    encoder,
    prefix,
): VariableSizeEncoder<TFrom>;

Stores the size of the encoder in bytes as a prefix using the prefix encoder.

See addCodecSizePrefix for more information.

Type Parameters

Type ParameterDescription
TFromThe type of the value to encode.

Parameters

ParameterType
encoderEncoder<TFrom>
prefixNumberEncoder

Returns

VariableSizeEncoder<TFrom>

See

addCodecSizePrefix

On this page