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

Function decompress

packages/effect/test/unstable/http/HttpCompression.test.ts:35–36  ·  view source on GitHub ↗
(data: ArrayBuffer, format: "gzip" | "deflate")

Source from the content-addressed store, hash-verified

33 )
34
35const decompress = (data: ArrayBuffer, format: "gzip" | "deflate"): Promise<string> =>
36 new Response(new Blob([data]).stream().pipeThrough(new DecompressionStream(format))).text()
37
38const platformContext = (compression: HttpPlatform.Compression): Context.Context<HttpPlatform.HttpPlatform> =>
39 Context.make(

Callers 1

Calls 2

streamMethod · 0.65
textMethod · 0.45

Tested by

no test coverage detected