code: function hookOnEntryFinish(stream, fn) {
    // NOTE this might break on future releases of compressing module,
    // Using exact version on package.json is recommended to stay safe
    // (Compressing Module Version: 1.2.3)
  
    var originalFunction = stream._onEntryFinish;
  
    stream._onEntryFinish = function (err) {
      // Current entries befire shift()
      if (this._waitingEntries && this._waitingEntries.length > 0) {
        fn(this._waitingEntries[0][0]);
      }
  
      originalFunction.apply(this, arguments);
    };
  }
docs: Hook _onEntryFinish(err) of stream.js