MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sideBand

Function sideBand

packages/plugins/apps/src/source/app-source.test.ts:33–44  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

31};
32
33const sideBand = (bytes: Uint8Array): Uint8Array => {
34 const chunks: Uint8Array[] = [pktLine("NAK\n")];
35 for (let offset = 0; offset < bytes.length; offset += 60_000) {
36 const chunk = bytes.subarray(offset, offset + 60_000);
37 const payload = new Uint8Array(chunk.length + 1);
38 payload[0] = 1;
39 payload.set(chunk, 1);
40 chunks.push(pktLine(payload));
41 }
42 chunks.push(FLUSH);
43 return concat(chunks);
44};
45
46const advertisement = (sha: string): Uint8Array =>
47 concat([

Callers 1

fixtureServerFunction · 0.70

Calls 4

pktLineFunction · 0.90
setMethod · 0.80
pushMethod · 0.80
concatFunction · 0.70

Tested by

no test coverage detected