• Writes a little-endian representation of bitLen-bit unsigned value to array starting at offset.

    Supports bit lengths divisible by 8, up to 48.

    If byte array is not given, creates a new one.

    Returns the output byte array.

    Parameters

    • bitLength: number
    • value: number
    • out: Uint8Array = ...
    • offset: number = 0

    Returns Uint8Array