Skip to content

concatBytes

concatBytes(arrays): Uint8Array<ArrayBuffer>

Defined in: packages/core/src/buffer/concat-bytes.ts:12

Concatenates any number of Uint8Arrays into one, copying each source once — linear in the total byte length. Accepts an array directly to avoid forcing a spread at large call counts; the variadic overload is for the common small, fixed-arity call site.

The result is always backed by a plain ArrayBuffer, never a shared one, so it satisfies BufferSource and can be handed straight to a Web API.

readonly Uint8Array<ArrayBufferLike>[]

Uint8Array<ArrayBuffer>

concatBytes(…arrays): Uint8Array<ArrayBuffer>

Defined in: packages/core/src/buffer/concat-bytes.ts:15

Concatenates any number of Uint8Arrays into one, copying each source once — linear in the total byte length. Accepts an array directly to avoid forcing a spread at large call counts; the variadic overload is for the common small, fixed-arity call site.

The result is always backed by a plain ArrayBuffer, never a shared one, so it satisfies BufferSource and can be handed straight to a Web API.

…Uint8Array<ArrayBufferLike>[]

Uint8Array<ArrayBuffer>