Class Coder<TInput, TDecoded>Abstract
Type Parameters
- TInput = unknown
- TDecoded = unknown
Constructors
constructor
- new Coder<TInput, TDecoded>(name, type, encodedLength): Coder<TInput, TDecoded>
Type Parameters
- TInput = unknown
- TDecoded = unknown
Parameters
- name: string
- type: string
- encodedLength: number
Properties
Readonly
encodedLength
encodedLength: number
Readonly
name
name: string
Readonly
type
type: string
Methods
Abstract
decode
- decode(data, offset, length?): [TDecoded, number]
Parameters
- data: Uint8Array
- offset: number
Optional
length: number
Returns [TDecoded, number]
Abstract
encode
- encode(value, length?): Uint8Array
Parameters
- value: TInput
Optional
length: number
Returns Uint8Array