(bytes: Uint8Array, chunkSize = 4096)
| 30 | } |
| 31 | |
| 32 | const decode = (bytes: Uint8Array, chunkSize = 4096) => |
| 33 | entries(bytes, chunkSize).pipe( |
| 34 | Stream.mapEffect((entry) => |
| 35 | Effect.map(Stream.mkUint8Array(entry.body), (body) => ({ header: entry.header, body })) |
| 36 | ), |
| 37 | Stream.runCollect |
| 38 | ) |
| 39 | |
| 40 | const failure = <A>(effect: Effect.Effect<A, unknown>) => |
| 41 | Effect.map(Effect.flip(effect), (error) => Tar.isTarError(error) ? error.kind : error) |
no test coverage detected