MCPcopy
hub / github.com/mongodb/node-mongodb-native / zlibInflate

Function zlibInflate

src/cmap/wire_protocol/compression.ts:46–53  ·  view source on GitHub ↗
(buf: zlib.InputType)

Source from the content-addressed store, hash-verified

44const ZSTD_COMPRESSION_LEVEL = 3;
45
46const zlibInflate = (buf: zlib.InputType) => {
47 return new Promise<Uint8Array>((resolve, reject) => {
48 zlib.inflate(buf, (error, result) => {
49 if (error) return reject(error);
50 resolve(result);
51 });
52 });
53};
54
55const zlibDeflate = (buf: zlib.InputType, options: zlib.ZlibOptions) => {
56 return new Promise<Uint8Array>((resolve, reject) => {

Callers 1

decompressFunction · 0.85

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected