• Swap byte order of the byte array in place, interpreting the buffer as an array of 32-bit integers

    Parameters

    • buf: Uint8Array

    Returns void

    `swap32(new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0])) // becomes [0x78, 0x56, 0x34, 0x12, 0xf0, 0xde, 0xbc, 0x9a]
    

    RangeError when the buffer length is not a multiple of 4