Constructors
constructor
- new BufferReader(options?: Buffer | SmartBufferOptions): BufferReader
Parameters
Optional options: Buffer | SmartBufferOptions
Properties
smartBuffer
smartBuffer: SmartBuffer
Accessors
internalBuffer
- get internalBuffer(): Buffer
Returns Buffer
readOffset
- get readOffset(): number
- set readOffset(val: number): void
Returns number
Parameters
Returns void
Methods
readBigUInt64BE
- readBigUInt64BE(): bigint
Returns bigint
readBigUIntBE
- readBigUIntBE(length: number): bigint
Parameters
Returns bigint
readBigUIntLE
- readBigUIntLE(length: number): bigint
Parameters
Returns bigint
readBuffer
- readBuffer(length: number): Buffer
Parameters
Returns Buffer
readString
- readString(arg?: number | BufferEncoding, encoding?: BufferEncoding): string
Parameters
Optional arg: number | BufferEncoding
Optional encoding: BufferEncoding
Returns string
readUInt16BE
Returns number
readUInt32BE
- readUInt32BE(offset?: number): number
Parameters
Returns number
readUInt8
Returns number
readUInt8Enum
- readUInt8Enum<T, TEnumValue>(enumVariable: { [ key in string]: TEnumValue }, invalidEnumErrorFormatter: ((val: number) => Error)): TEnumValue
Type Parameters
T extends string
TEnumValue extends number
Parameters
enumVariable: { [ key in string]: TEnumValue }
invalidEnumErrorFormatter: ((val: number) => Error)
Returns TEnumValue
Static fromBuffer
Parameters