signify-ts
    Preparing search index...

    Function readInt

    • Converts a big-endian byte array into an integer.

      Parameters

      • array: Uint8Array

        A Uint8Array of bytes representing a big-endian integer.

      Returns number

      The integer represented by the byte array.

      Example: readInt(Uint8Array([0x01, 0x02, 0x03])) // returns 66051

      How it works:

      • The function interprets the array as a big-endian number.
      • Each byte is added to the integer after shifting the previous value left by 8 bits (multiplying by 256).