code: function() {
  			var that = this;
  			var len = that.dstate.pending;
  
  			if (len > that.avail_out)
  				len = that.avail_out;
  			if (len === 0)
  				return;
  
  			// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index
  			// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +
  			// len)) {
  			// console.log(that.dstate.pending_buf.length + ", " + that.dstate.pending_out + ", " + that.next_out.length + ", " +
  			// that.next_out_index + ", " + len);
  			// console.log("avail_out=" + that.avail_out);
  			// }
  
  			that.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);
  
  			that.next_out_index += len;
  			that.dstate.pending_out += len;
  			that.total_out += len;
  			that.avail_out -= len;
  			that.dstate.pending -= len;
  			if (that.dstate.pending === 0) {
  				that.dstate.pending_out = 0;
  			}
  		}
docs: Flush as much pending output as possible. All deflate() output goes through this function so some applications may wish to modify it to avoid allocating a large strm->next_out buffer and copying into it. (See also read_buf()).