function $1cbd2f72abde9a52$var$writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
    if (!isBuf) {
        var newChunk = $1cbd2f72abde9a52$var$decodeChunk(state, chunk, encoding);
        if (chunk !== newChunk) {
            isBuf = true;
            encoding = 'buffer';
            chunk = newChunk;
        }
    }
    var len = state.objectMode ? 1 : chunk.length;
    state.length += len;
    var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
    if (!ret) state.needDrain = true;
    if (state.writing || state.corked) {
        var last = state.lastBufferedRequest;
        state.lastBufferedRequest = {
            chunk: chunk,
            encoding: encoding,
            isBuf: isBuf,
            callback: cb,
            next: null
        };
        if (last) last.next = state.lastBufferedRequest;
        else state.bufferedRequest = state.lastBufferedRequest;
        state.bufferedRequestCount += 1;
    } else $1cbd2f72abde9a52$var$doWrite(stream, state, false, len, chunk, encoding, cb);
    return ret;
}
// If we return false, then we need a drain event, so set that flag.
If we return false, then we need a drain event, so set that flag.
If we return false then we need a drain event so set that flag .
function $1cbd2f72abde9a52$var$writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
    if (!isBuf) {
        var newChunk = $1cbd2f72abde9a52$var$decodeChunk(state, chunk, encoding);
        if (chunk !== newChunk) {
            isBuf = true;
            encoding = 'buffer';
            chunk = newChunk;
        }
    }
    var len = state.objectMode ? 1 : chunk.length;
    state.length += len;
    var ret = state.length < state.highWaterMark; 
    if (!ret) state.needDrain = true;
    if (state.writing || state.corked) {
        var last = state.lastBufferedRequest;
        state.lastBufferedRequest = {
            chunk: chunk,
            encoding: encoding,
            isBuf: isBuf,
            callback: cb,
            next: null
        };
        if (last) last.next = state.lastBufferedRequest;
        else state.bufferedRequest = state.lastBufferedRequest;
        state.bufferedRequestCount += 1;
    } else $1cbd2f72abde9a52$var$doWrite(stream, state, false, len, chunk, encoding, cb);
    return ret;
}
function $1cbd2f72abde9a52$var$writeOrBuffer ( stream , state , isBuf , chunk , encoding , cb ) { if ( ! isBuf ) { var newChunk = $1cbd2f72abde9a52$var$decodeChunk ( state , chunk , encoding ) ; if ( chunk !== newChunk ) { isBuf = true ; encoding = 'buffer' ; chunk = newChunk ; } } var len = state . objectMode ? 1 : chunk . length ; state . length += len ; var ret = state . length < state . highWaterMark ; if ( ! ret ) state . needDrain = true ; if ( state . writing || state . corked ) { var last = state . lastBufferedRequest ; state . lastBufferedRequest = { chunk : chunk , encoding : encoding , isBuf : isBuf , callback : cb , next : null } ; if ( last ) last . next = state . lastBufferedRequest ; else state . bufferedRequest = state . lastBufferedRequest ; state . bufferedRequestCount += 1 ; } else $1cbd2f72abde9a52$var$doWrite ( stream , state , false , len , chunk , encoding , cb ) ; return ret ; }
If we return false, then we need a drain event, so set that flag.
If we return false then we need a drain event so set that flag .
// we must ensure that previous needDrain will not be reset to false.