(spdyDict)
| 76 | } |
| 77 | |
| 78 | function deflateResetDictionaryTest(spdyDict) { |
| 79 | let doneReset = false; |
| 80 | let output = ''; |
| 81 | const deflate = zlib.createDeflate({ dictionary: spdyDict }); |
| 82 | const inflate = zlib.createInflate({ dictionary: spdyDict }); |
| 83 | inflate.setEncoding('utf-8'); |
| 84 | |
| 85 | deflate.on('data', function(chunk) { |
| 86 | if (doneReset) |
| 87 | inflate.write(chunk); |
| 88 | }); |
| 89 | |
| 90 | inflate.on('data', function(chunk) { |
| 91 | output += chunk; |
| 92 | }); |
| 93 | |
| 94 | deflate.on('end', function() { |
| 95 | inflate.end(); |
| 96 | }); |
| 97 | |
| 98 | inflate.on('end', common.mustCall(function() { |
| 99 | assert.strictEqual(input, output); |
| 100 | })); |
| 101 | |
| 102 | deflate.write(input); |
| 103 | deflate.flush(function() { |
| 104 | deflate.reset(); |
| 105 | doneReset = true; |
| 106 | deflate.write(input); |
| 107 | deflate.end(); |
| 108 | }); |
| 109 | } |
| 110 | |
| 111 | function rawDictionaryTest(spdyDict) { |
| 112 | let output = ''; |
no test coverage detected
searching dependent graphs…