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

Method body

packages/effect/src/encoding/Tar.ts:1374–1389  ·  view source on GitHub ↗
(chunk: Uint8Array)

Source from the content-addressed store, hash-verified

1372 }
1373
1374 body(chunk: Uint8Array): void {
1375 const header = this.header!
1376 this.written += chunk.length
1377 if (this.written > header.size) {
1378 throw sizeMismatch(header, this.written)
1379 }
1380 if (chunk.length < COPY_LIMIT) {
1381 // `reserve` can start a new slab, so it must run before `slab` is read
1382 const offset = this.reserve(chunk.length)
1383 this.slab.set(chunk, offset)
1384 return
1385 }
1386 this.cut()
1387 this.chunks.push(chunk)
1388 this.buffered += chunk.length
1389 }
1390
1391 end(): void {
1392 const header = this.header!

Callers 11

encodeFunction · 0.95
makeFunction · 0.45
makeFunction · 0.45
makeExporterFunction · 0.45
PageFunction · 0.45
exportBatchFunction · 0.45
[contA]Function · 0.45
[evaluate]Function · 0.45
startFetchFunction · 0.45
tiles.tsFile · 0.45
SheetDemo.tsFile · 0.45

Calls 5

reserveMethod · 0.95
cutMethod · 0.95
sizeMismatchFunction · 0.70
setMethod · 0.65
pushMethod · 0.65

Tested by 2

makeExporterFunction · 0.36
PageFunction · 0.36