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

Function brotliParams

packages/platform/node-shared/src/NodeHttpCompression.ts:32–41  ·  view source on GitHub ↗
(level: number | undefined, sizeHint?: number)

Source from the content-addressed store, hash-verified

30)
31
32const brotliParams = (level: number | undefined, sizeHint?: number): Zlib.BrotliOptions => {
33 const params: Record<number, number> = {}
34 if (level !== undefined) {
35 params[Zlib.constants.BROTLI_PARAM_QUALITY] = level
36 }
37 if (sizeHint !== undefined) {
38 params[Zlib.constants.BROTLI_PARAM_SIZE_HINT] = sizeHint
39 }
40 return { params }
41}
42
43const zstdParams = (level: number | undefined): Zlib.ZstdOptions | undefined =>
44 level === undefined || level === 3 ? undefined : { params: { [Zlib.constants.ZSTD_c_compressionLevel]: level } }

Callers 2

compressFunction · 0.85
compressTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected