FixedSizeNumberCodec

type FixedSizeNumberCodec<TSize> = 
  | FixedSizeCodec<bigint | number, bigint, TSize>
| FixedSizeCodec<bigint | number, number, TSize>;

Represents a fixed-size codec for encoding and decoding numbers and bigints.

This codec uses a specific number of bytes (TSize) for serialization. The encoded value can be either a number or bigint, but the decoded value will always be a number or bigint, depending on the implementation.

Type Parameters

Type ParameterDefault typeDescription
TSize extends numbernumberThe number of bytes used for encoding and decoding.

See

NumberCodec

On this page