/** * Swap byte order of the byte array **in place**, * interpreting the buffer as an array of 16-bit integers * * @example `swap16(new Uint8Array([0x12, 0x34, 0x56, 0x78])) // becomes [0x34, 0x12, 0x78, 0x56] * @throws RangeError when the buffer length is not a multiple of 2 */ export declare function swap16(buf: Uint8Array): void; /** * Swap byte order of the byte array **in place**, * interpreting the buffer as an array of 32-bit integers * * @example `swap32(new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0])) // becomes [0x78, 0x56, 0x34, 0x12, 0xf0, 0xde, 0xbc, 0x9a] * @throws RangeError when the buffer length is not a multiple of 4 */ export declare function swap32(buf: Uint8Array): void; /** * Swap byte order of the byte array **in place**, * interpreting the buffer as an array of 64-bit integers * * @example `swap32(new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0])) // becomes [0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12] * @throws RangeError when the buffer length is not a multiple of 4 */ export declare function swap64(buf: Uint8Array): void; /** * Swap the *half-byte* ordering of each byte in the byte array, **in place** * * @example `swap8(new Uint8Array([0x12, 0x34, 0x56, 0x78])) // becomes [0x21, 0x43, 0x65, 0x87] */ export declare function swapNibbles(buf: Uint8Array): void;