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

Method data

packages/effect/src/encoding/Zip.ts:1171–1186  ·  view source on GitHub ↗
(chunks: ReadonlyArray<Uint8Array>)

Source from the content-addressed store, hash-verified

1169
1170 // Writes stored or compressed body bytes
1171 data(chunks: ReadonlyArray<Uint8Array>): void {
1172 const { header, record } = this.current!
1173 for (const chunk of chunks) {
1174 this.push(chunk)
1175 record.compressedSize += chunk.length
1176 }
1177 const size = header.type === "Directory" ? 0 : header.size
1178 if (size !== undefined && record.size > size) throw sizeMismatch(header.path, record.size, size)
1179 if (!record.zip64 && record.compressedSize >= MAX32) {
1180 throw new ZipError({
1181 kind: "SizeMismatch",
1182 message: `compressed data of ${JSON.stringify(header.path)} reached 4 GiB, ` +
1183 `but its local header has no ZIP64 sizes`
1184 })
1185 }
1186 }
1187
1188 end(): void {
1189 const { descriptor, header, record } = this.current!

Callers 7

encodeFunction · 0.95
resolveFunction · 0.80
slotsOfFunction · 0.80
combineFunction · 0.80
missingFunction · 0.80
elementFunction · 0.80
bodyOwnedFunction · 0.80

Calls 2

pushMethod · 0.95
sizeMismatchFunction · 0.70

Tested by 1

resolveFunction · 0.64