Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Int64Impl

Implementation of signed 64-bit integer. May be constructed from a buffer, string or number.

Hierarchy

  • Int64Impl

Implements

Index

Constructors

constructor

  • Create a new Int64Impl instance

    Parameters

    • value: string | number | Uint8Array | Int64Impl

      the value of the integer

    Returns Int64Impl

Properties

Private Readonly buffer

buffer: Uint8Array

The buffer holding the integer data

Methods

getHighBits

  • getHighBits(): number
  • Get the high bits of the integer

    Returns number

    the high bits of the number

getLowBits

  • getLowBits(): number
  • Get the low bits of the integer

    Returns number

    the low bits of the number

isNegative

  • isNegative(): boolean
  • Check is the number is negative

    Returns boolean

    true if the integer is negative

toBuffer

  • toBuffer(): Uint8Array
  • Get the integer stored in a buffer

    Returns Uint8Array

    the internal buffer

toNumber

  • toNumber(): number
  • Read this value as a number. The validity of the returned number can only be guaranteed for values up to Math.pow(2, 53) - 1 due to underlying platform limitations of JavaScript.

    Returns number

    the numerical value of this int64, as a 53-bit integer.

toString

  • toString(radix?: number): string
  • inheritdoc

    Parameters

    • Default value radix: number = 10

    Returns string

Static toString

  • toString(): string
  • Return the name of the data type

    Returns string

    Int64Impl

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.