Function writeSpecificIntType

  • Writes an integer to a buffer.

    Type Parameters

    • TArrayBuffer extends ArrayBufferLike = ArrayBufferLike

      The type of the buffer.

    Parameters

    • buffer: Buffer<TArrayBuffer>

      The buffer to write to.

    • value: bigint

      The integer to write.

    • bytes: number

      The number of bytes to write.

    • format: "BE" | "LE"

      The endianness of the data.

    • signed: boolean = false

      The signedness of the data. Defaults to false.

    • offset: number = 0

      The offset to write to. Defaults to 0.

    • Optionaloptions: WriteSpecificIntTypeOptions

      The options to use.

    Returns Buffer<TArrayBuffer>

    The buffer from the buffer parameter.

    If the byte length is less than 1.

    If the buffer does not have enough space at the specified offset.

    If the value is out of range and options.wrap is false.