(chunk, encoding, callback)
| 34 | } |
| 35 | |
| 36 | _write(chunk, encoding, callback) { |
| 37 | if (!Buffer.isBuffer(chunk)) { |
| 38 | chunk = Buffer.from(chunk + '\n', 'binary'); |
| 39 | } |
| 40 | |
| 41 | this.uncompressedLength += chunk.length; |
| 42 | if (this.data.Length == null) { |
| 43 | this.data.Length = 0; |
| 44 | } |
| 45 | |
| 46 | if (this.compress) { |
| 47 | if (!this.deflate) { |
| 48 | this.initDeflate(); |
| 49 | } |
| 50 | this.deflate.write(chunk); |
| 51 | } else { |
| 52 | this.chunks.push(chunk); |
| 53 | this.data.Length += chunk.length; |
| 54 | } |
| 55 | |
| 56 | return callback(); |
| 57 | } |
| 58 | |
| 59 | end() { |
| 60 | super.end(...arguments); |
no test coverage detected