Constructors
constructor
- new BufferVisitor(buf: Buffer, start?: number, end?: number): BufferVisitor
-
Parameters
-
buf: Buffer
-
Default value start: number = 0
-
Default value end: number = 0
Methods
mustHas
- mustHas(steps: number, message?: string): this
-
Parameters
-
steps: number
-
Default value message: string = "Too few bytes to parse."
Returns this
mustWalk
- mustWalk(steps: number, message?: undefined | string): this
-
Parameters
-
steps: number
-
Optional message: undefined | string
Returns this
reset
- reset(start?: number, end?: number): this
-
Parameters
-
Default value start: number = 0
-
Default value end: number = 0
Returns this
walk
- walk(steps: number): this
BufferVisitor is a visit tool to manipulate buffer.