()
| 134 | |
| 135 | resume() { |
| 136 | const emit = () => { |
| 137 | if (this.paused) return; |
| 138 | if (this.offset >= this.length) { |
| 139 | this.ended = true; |
| 140 | return this.emit('end'); |
| 141 | } |
| 142 | const end = Math.min(this.offset + this.trickle, this.length); |
| 143 | const c = this.chunk.slice(this.offset, end); |
| 144 | this.offset += c.length; |
| 145 | this.emit('data', c); |
| 146 | process.nextTick(emit); |
| 147 | }; |
| 148 | |
| 149 | if (this.ended) return; |
| 150 | this.emit('resume'); |