• Convert BigInt to little-endian bytes, writing directly into a provided buffer. This is an optimized version that avoids buffer allocation.

    Parameters

    • num: bigint

      BigInt value to convert

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

      Pre-allocated buffer to write into (width is inferred from length)

    Returns void