lib/permessage-deflate.js
function inflateOnData(chunk) {
  this[kTotalLength] += chunk.length;

  if (
    this[kPerMessageDeflate]._maxPayload < 1 ||
    this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
  ) {
    this[kBuffers].push(chunk);
    return;
  }

  this[kError] = new RangeError('Max payload size exceeded');
  this[kError][kStatusCode] = 1009;
  this.removeListener('data', inflateOnData);
  this.reset();
}
function inflateOnData(chunk) {
  this[kTotalLength] += chunk.length;

  if (
    this[kPerMessageDeflate]._maxPayload < 1 ||
    this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
  ) {
    this[kBuffers].push(chunk);
    return;
  }

  this[kError] = new RangeError('Max payload size exceeded');
  this[kError][kStatusCode] = 1009;
  this.removeListener('data', inflateOnData);
  this.reset();
}
function inflateOnData ( chunk ) { this [ kTotalLength ] += chunk . length ; if ( this [ kPerMessageDeflate ] . _maxPayload < 1 || this [ kTotalLength ] <= this [ kPerMessageDeflate ] . _maxPayload ) { this [ kBuffers ] . push ( chunk ) ; return ; } this [ kError ] = new RangeError ( 'Max payload size exceeded' ) ; this [ kError ] [ kStatusCode ] = 1009 ; this . removeListener ( 'data' , inflateOnData ) ; this . reset ( ) ; }
The listener of the `zlib.InflateRaw` stream `'data'` event.

@param {Buffer} chunk A chunk of data
@private
The listener of the zlib . InflateRaw stream data event .