eolib - v2.0.1
    Preparing search index...

    Function swapMultiples

    • Swaps the order of contiguous bytes in a sequence of bytes that are divisible by a given multiple value.
      Used when encrypting and decrypting packets and data files.

      Parameters

      • data: Uint8Array

        the data to swap bytes in

      • multiple: number

        the multiple value

      Returns void

      multiple = 3
      {10, 21, 27} → {10, 27, 21}

      This is an in-place operation.