Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BufferReader

Index

Constructors

  • new BufferReader(options?: Buffer | SmartBufferOptions): BufferReader
  • Parameters

    • Optional options: Buffer | SmartBufferOptions

    Returns BufferReader

Properties

smartBuffer: SmartBuffer

Accessors

  • get internalBuffer(): Buffer
  • Returns Buffer

  • get readOffset(): number
  • set readOffset(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

Methods

  • readBigUInt64BE(): bigint
  • Returns bigint

  • readBigUIntBE(length: number): bigint
  • Parameters

    • length: number

    Returns bigint

  • readBigUIntLE(length: number): bigint
  • Parameters

    • length: number

    Returns bigint

  • readBuffer(length: number): Buffer
  • Parameters

    • length: number

    Returns Buffer

  • readString(arg?: number | BufferEncoding, encoding?: BufferEncoding): string
  • Parameters

    • Optional arg: number | BufferEncoding
    • Optional encoding: BufferEncoding

    Returns string

  • readUInt16BE(): number
  • Returns number

  • readUInt32BE(offset?: number): number
  • Parameters

    • Optional offset: number

    Returns number

  • readUInt8(): number
  • Returns number

  • 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)
        • (val: number): Error
        • Parameters

          • val: number

          Returns Error

    Returns TEnumValue

  • Parameters

    • buffer: Buffer

    Returns BufferReader

Generated using TypeDoc