Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 856 Bytes

File metadata and controls

26 lines (16 loc) · 856 Bytes

Home > tsbuffer > TSBuffer > decode

TSBuffer.decode() method

解码

Signature:

decode<T = unknown>(buf: Uint8Array, schemaOrId: string | TSBufferSchema, options?: DecodeOptions): DecodeOutput<T>;

Parameters

Parameter Type Description
buf Uint8Array 待解码的二进制数据
schemaOrId string | TSBufferSchema Schema 或 SchemaID,例如a/b.ts下的Test类型,其ID为a/b/Test
options DecodeOptions

Returns:

DecodeOutput<T>