MCPcopy Create free account
hub / github.com/Effect-TS/effect / concat

Function concat

packages/effect/src/encoding/Zip.ts:718–727  ·  view source on GitHub ↗
(chunks: ReadonlyArray<Uint8Array>, length: number)

Source from the content-addressed store, hash-verified

716}
717
718const concat = (chunks: ReadonlyArray<Uint8Array>, length: number): Uint8Array => {
719 if (chunks.length === 1) return chunks[0]
720 const out = new Uint8Array(length)
721 let at = 0
722 for (const chunk of chunks) {
723 out.set(chunk, at)
724 at += chunk.length
725 }
726 return out
727}
728
729const invalidHeader = (message: string) => new ZipError({ kind: "InvalidHeader", message })
730

Callers 2

encodeFunction · 0.70
deflateBytesFunction · 0.70

Calls 1

setMethod · 0.65

Tested by

no test coverage detected