Constructors
constructor
- new Decoder(protos: object): Decoder
Properties
offset
offset: number = 0
Methods
decode
- decode(route: string, buf: Buffer): object
-
Parameters
-
route: string
-
buf: Buffer
Returns object
decodeArray
- decodeArray(array: Array<any>, type: string, protos: object): void
-
Parameters
-
array: Array<any>
-
type: string
-
protos: object
Returns void
decodeMsg
- decodeMsg(msg: object, protos: object, length: number): object
-
Parameters
-
msg: object
-
protos: object
-
length: number
Returns object
decodeProp
- decodeProp(type: string, protos?: object): object
-
Parameters
-
type: string
-
Optional protos: object
Returns object
getBytes
- getBytes(flag?: boolean): number[]
-
Parameters
Returns number[]
init
- init(protos: object): void
isFinish
- isFinish(msg: object, protos: object): boolean
-
Parameters
-
msg: object
-
protos: object
Returns boolean
setProtos
- setProtos(protos: object): void
Get property head from protobuf