MCPcopy Create free account
hub / github.com/cloudflare/agents / concatBytes

Function concatBytes

packages/shell/src/extras.ts:474–483  ·  view source on GitHub ↗
(chunks: Uint8Array[])

Source from the content-addressed store, hash-verified

472}
473
474function concatBytes(chunks: Uint8Array[]): Uint8Array {
475 const total = chunks.reduce((sum, chunk) => sum + chunk.byteLength, 0);
476 const out = new Uint8Array(total);
477 let offset = 0;
478 for (const chunk of chunks) {
479 out.set(chunk, offset);
480 offset += chunk.byteLength;
481 }
482 return out;
483}
484
485function createTarHeader(entry: TarInputEntry): Uint8Array {
486 const header = new Uint8Array(512);

Callers 2

buildTarFunction · 0.85
transformBytesFunction · 0.85

Calls 1

setMethod · 0.65

Tested by

no test coverage detected