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

Function basicDictionaryTest

test/parallel/test-zlib-dictionary.js:52–76  ·  view source on GitHub ↗
(spdyDict)

Source from the content-addressed store, hash-verified

50].join('\r\n');
51
52function basicDictionaryTest(spdyDict) {
53 let output = '';
54 const deflate = zlib.createDeflate({ dictionary: spdyDict });
55 const inflate = zlib.createInflate({ dictionary: spdyDict });
56 inflate.setEncoding('utf-8');
57
58 deflate.on('data', function(chunk) {
59 inflate.write(chunk);
60 });
61
62 inflate.on('data', function(chunk) {
63 output += chunk;
64 });
65
66 deflate.on('end', function() {
67 inflate.end();
68 });
69
70 inflate.on('end', common.mustCall(function() {
71 assert.strictEqual(input, output);
72 }));
73
74 deflate.write(input);
75 deflate.end();
76}
77
78function deflateResetDictionaryTest(spdyDict) {
79 let doneReset = false;

Callers 1

Calls 4

setEncodingMethod · 0.45
onMethod · 0.45
writeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…