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

Function encode

packages/effect/test/encoding/Tar.test.ts:20–24  ·  view source on GitHub ↗
(entries: ReadonlyArray<Tar.Entry<E>>, options?: Tar.EncodeOptions)

Source from the content-addressed store, hash-verified

18const text = (bytes: Uint8Array) => textDecoder.decode(bytes)
19
20const encode = <E>(entries: ReadonlyArray<Tar.Entry<E>>, options?: Tar.EncodeOptions) =>
21 Stream.fromIterable(entries).pipe(
22 Stream.pipeThroughChannel(Tar.encode(options)),
23 Stream.mkUint8Array
24 )
25
26const entries = (bytes: Uint8Array, chunkSize: number) => {
27 const chunks: Array<Uint8Array> = []

Callers 4

Sse.test.tsFile · 0.70
Tar.test.tsFile · 0.70
EventLog.test.tsFile · 0.50

Calls 2

encodeMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected