MCPcopy Index your code
hub / github.com/nodejs/node / testZstdCompatWithZlib

Function testZstdCompatWithZlib

test/parallel/test-stream-iter-transform-compat.js:61–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59}
60
61async function testZstdCompatWithZlib() {
62 const zstdDecompress = promisify(zlib.zstdDecompress);
63
64 const input = 'Cross-compat zstd test. '.repeat(100);
65 const compressed = await bytes(pull(from(input), compressZstd()));
66
67 const decompressed = await zstdDecompress(compressed);
68 assert.strictEqual(decompressed.toString(), input);
69}
70
71// =============================================================================
72// Reverse compat: compress with zlib, decompress with new streams

Calls 6

promisifyFunction · 0.85
compressZstdFunction · 0.85
pullFunction · 0.70
bytesFunction · 0.50
fromFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…