Concatenates multiple Uint8Arrays into a single Uint8Array.
Allocates a single buffer and copies each array into it, which is more efficient than spread-based approaches for many or large arrays.
Zero or more Uint8Arrays to concatenate
A new Uint8Array containing all bytes in order
const a = new Uint8Array([1, 2, 3]);const b = new Uint8Array([4, 5]);const c = new Uint8Array([6]);concatUint8(a, b, c); // Uint8Array([1, 2, 3, 4, 5, 6])concatUint8(); // Uint8Array([])concatUint8(a); // Uint8Array([1, 2, 3]) Copy
const a = new Uint8Array([1, 2, 3]);const b = new Uint8Array([4, 5]);const c = new Uint8Array([6]);concatUint8(a, b, c); // Uint8Array([1, 2, 3, 4, 5, 6])concatUint8(); // Uint8Array([])concatUint8(a); // Uint8Array([1, 2, 3])
Concatenates multiple Uint8Arrays into a single Uint8Array.
Allocates a single buffer and copies each array into it, which is more efficient than spread-based approaches for many or large arrays.