MCPcopy Create free account
hub / github.com/expressjs/compression / writeAndFlush

Function writeAndFlush

test/compression.js:1046–1055  ·  view source on GitHub ↗
(stream, count, buf)

Source from the content-addressed store, hash-verified

1044}
1045
1046function 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
1057function unchunk (encoding, onchunk, onend) {
1058 return function (res) {

Callers 1

compression.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected