@tgsnake/skema
    Preparing search index...

    Function bigintToBuffer

    • Converts a bigint value to a Buffer with specified padding, endianness, and signedness.

      Parameters

      • int: bigint

        The bigint value to convert.

      • padding: number

        The number of bytes to pad the buffer to. Must be at least the minimum required to represent the value.

      • litte: boolean = true

        If true, the buffer will be in little-endian order; if false, big-endian. Defaults to true.

      • signed: boolean = false

        If true, the value is treated as signed and two's complement is used for negative numbers. Defaults to false.

      Returns Buffer<ArrayBuffer>

      A Buffer representing the bigint value with the specified options.

      If the value cannot fit in the specified padding or if an unsigned conversion is attempted with a negative value.