@qualithm/mqtt-wire - v0.1.5
    Preparing search index...

    Function encodeVariableByteIntegerToArray

    • Creates a new Uint8Array containing the encoded variable byte integer.

      Parameters

      • value: number

        The integer value to encode (0 to 268,435,455)

      Returns Uint8Array

      A new Uint8Array containing the encoded bytes

      RangeError if value is out of range

      encodeVariableByteIntegerToArray(321)  // Uint8Array([0xc1, 0x02])