• Convert a little-endian buffer to BigInt.

    Parameters

    • buffer: Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

      Little-endian byte buffer

    Returns bigint

    BigInt value

    const buffer = new Uint8Array([0x04, 0x03, 0x02, 0x01]);
    const num = toBigIntLE(buffer); // 16909060n