(spdyDict)
| 50 | ].join('\r\n'); |
| 51 | |
| 52 | function 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 | |
| 78 | function deflateResetDictionaryTest(spdyDict) { |
| 79 | let doneReset = false; |
no test coverage detected
searching dependent graphs…