Constructors
constructor
- new BufferReader(options?: SmartBufferOptions | Buffer): BufferReader
-
Parameters
-
Optional options: SmartBufferOptions | Buffer
Properties
smartBuffer
smartBuffer: SmartBuffer
Accessors
internalBuffer
- get internalBuffer(): Buffer
readOffset
- get readOffset(): number
- set readOffset(val: number): void
-
Returns number
-
Parameters
Returns void
Methods
readBigUInt64BE
- readBigUInt64BE(): 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
readUInt32BE
- readUInt32BE(offset?: undefined | number): number
-
Parameters
-
Optional offset: undefined | number
Returns number
readUInt8Enum
- readUInt8Enum<T, TEnumValue>(enumVariable: {}, invalidEnumErrorFormatter: (val: number) => Error): TEnumValue
-
Type parameters
-
T: string
-
TEnumValue: number
Parameters
-
enumVariable: {}
-
invalidEnumErrorFormatter: (val: number) => Error
Returns TEnumValue