(c)
| 86 | let total = 0; |
| 87 | return { |
| 88 | push(c) { |
| 89 | chunks.push(c); |
| 90 | total += c.length; |
| 91 | if (total > maxBytes * 2) { |
| 92 | const merged = Buffer.concat(chunks).subarray(-maxBytes); |
| 93 | chunks = [merged]; |
| 94 | total = merged.length; |
| 95 | } |
| 96 | }, |
| 97 | text() { |
| 98 | return Buffer.concat(chunks).subarray(-maxBytes).toString('utf8'); |
| 99 | }, |