MCPcopy
hub / github.com/promptfoo/promptfoo / compress

Function compress

test/fetch.compression.test.ts:17–26  ·  view source on GitHub ↗
(encoding: SupportedEncoding, raw: Buffer)

Source from the content-addressed store, hash-verified

15};
16
17function compress(encoding: SupportedEncoding, raw: Buffer): Buffer {
18 switch (encoding) {
19 case 'br':
20 return brotliCompressSync(raw);
21 case 'deflate':
22 return deflateSync(raw);
23 case 'gzip':
24 return gzipSync(raw);
25 }
26}
27
28let restoreProxyEnv = () => {};
29let server: Server | undefined;

Callers 1

startCompressedServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…