Function mergeUint8Arrays

  • Merges multiple Uint8Array instances into a single Uint8Array.

    Returns

    A new Uint8Array containing all elements from the input arrays in order.

    Example

    const a = new Uint8Array([1, 2]);
    const b = new Uint8Array([3, 4]);
    const merged = mergeUint8Arrays(a, b); // → Uint8Array [1, 2, 3, 4]

    Remarks

    • Preserves the order of elements from each input array.
    • Efficiently concatenates arrays without creating intermediate arrays for each element.
    • Returns a new Uint8Array; the input arrays are not modified.

    Parameters

    • Rest ...ary: Uint8Array[]

      One or more Uint8Array instances to merge.

    Returns Uint8Array

Generated using TypeDoc