(stream, count, buf)
| 1044 | } |
| 1045 | |
| 1046 | function writeAndFlush (stream, count, buf) { |
| 1047 | var writes = 0 |
| 1048 | |
| 1049 | return function () { |
| 1050 | if (writes++ >= count) return |
| 1051 | if (writes === count) return stream.end(buf) |
| 1052 | stream.write(buf) |
| 1053 | stream.flush() |
| 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | function unchunk (encoding, onchunk, onend) { |
| 1058 | return function (res) { |