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

Method read

packages/effect/src/encoding/Zip.ts:1327–1337  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

1325 // Returns the buffered body bytes of the entry from generation `id`, or
1326 // `undefined` once the whole body has been read and checked
1327 read(id: number): Arr.NonEmptyArray<Uint8Array> | undefined | typeof NeedInput {
1328 if (id !== this.generation) {
1329 throw new ZipError({
1330 kind: "BodyConsumed",
1331 message: this.closed ?
1332 "zip entry body read after the archive stream ended" :
1333 "zip entry body read after moving to the next entry"
1334 })
1335 }
1336 return this.guard(() => this.readCurrent())
1337 }
1338
1339 private readCurrent(): Arr.NonEmptyArray<Uint8Array> | undefined | typeof NeedInput {
1340 const current = this.current

Callers

nothing calls this directly

Calls 2

guardMethod · 0.95
readCurrentMethod · 0.95

Tested by

no test coverage detected