MCPcopy Index your code
hub / github.com/Effect-TS/effect / split

Method split

packages/experimental/src/EventLogRemote.ts:56–65  ·  view source on GitHub ↗

* @since 1.0.0

(id: number, data: Uint8Array)

Source from the content-addressed store, hash-verified

54 * @since 1.0.0
55 */
56 static split(id: number, data: Uint8Array): ReadonlyArray<ChunkedMessage> {
57 const parts = Math.ceil(data.byteLength / constChunkSize)
58 const result: Array<ChunkedMessage> = new Array(parts)
59 for (let i = 0; i < parts; i++) {
60 const start = i * constChunkSize
61 const end = Math.min((i + 1) * constChunkSize, data.byteLength)
62 result[i] = new ChunkedMessage({ id, part: [i, parts], data: data.subarray(start, end) })
63 }
64 return result
65 }
66
67 /**
68 * @since 1.0.0

Callers 15

stringFunction · 0.80
wordsFunction · 0.80
inputTextFunction · 0.80
getWizardPrefixFunction · 0.80
parseFunction · 0.80
extractKeyValueFunction · 0.80
processArgsFunction · 0.80
loopFunction · 0.80
renderErrorFunction · 0.80
renderOutputFunction · 0.80
renderOutputFunction · 0.80
listFunction · 0.80

Calls

no outgoing calls

Tested by 2

simplifyStackTraceFunction · 0.64
testSplitLinesFunction · 0.64