addEncoderSentinel
Call Signature
Creates an encoder that writes a Uint8Array sentinel after the encoded value.
This is useful to delimit the encoded value when being read by a decoder.
See addCodecSentinel for more information.
Type Parameters
| Type Parameter | Description |
|---|---|
TFrom | The type of the value to encode. |
Parameters
| Parameter | Type |
|---|---|
encoder | FixedSizeEncoder<TFrom> |
sentinel | ReadonlyUint8Array |
Returns
FixedSizeEncoder<TFrom>
See
Call Signature
Creates an encoder that writes a Uint8Array sentinel after the encoded value.
This is useful to delimit the encoded value when being read by a decoder.
See addCodecSentinel for more information.
Type Parameters
| Type Parameter | Description |
|---|---|
TFrom | The type of the value to encode. |
Parameters
| Parameter | Type |
|---|---|
encoder | Encoder<TFrom> |
sentinel | ReadonlyUint8Array |
Returns
VariableSizeEncoder<TFrom>