Constructors
constructor
Parameters
packrInstance: null | Packr = null
Properties
Private packr
packr: Packr
Methods
decode
- decode<T>(arg: Buffer | Uint8Array): T
Type parameters
Parameters
Returns T
encode
- encode<T>(arg: T): Buffer
Type parameters
Parameters
Returns Buffer
use
- use(type: number, Class: Function, encode: (arg: any) => any, decode: (arg: any) => any): void
Parameters
type: number
Class: Function
encode: (arg: any) => any
decode: (arg: any) => any
Returns void