Options
All
  • Public
  • Public/Protected
  • All
Menu

bigint-buffer

Index

Functions

toBigIntBE

  • toBigIntBE(buf: Buffer): BigInt
  • Convert a big-endian buffer into a BigInt

    Parameters

    • buf: Buffer

      The big-endian buffer to convert.

    Returns BigInt

    A BigInt with the big-endian representation of buf.

toBigIntLE

  • toBigIntLE(buf: Buffer): BigInt
  • Convert a little-endian buffer into a BigInt.

    Parameters

    • buf: Buffer

      The little-endian buffer to convert

    Returns BigInt

    A BigInt with the little-endian representation of buf.

toBufferBE

  • toBufferBE(num: BigInt, width: number): Buffer
  • Convert a BigInt to a big-endian buffer.

    Parameters

    • num: BigInt

      The BigInt to convert.

    • width: number

      The number of bytes that the resulting buffer should be.

    Returns Buffer

    A big-endian buffer representation of num.

toBufferLE

  • toBufferLE(num: BigInt, width: number): Buffer
  • Convert a BigInt to a little-endian buffer.

    Parameters

    • num: BigInt

      The BigInt to convert.

    • width: number

      The number of bytes that the resulting buffer should be.

    Returns Buffer

    A little-endian buffer representation of num.

Generated using TypeDoc