| 694 | // `params()` function should not happen while a write is currently in progress |
| 695 | // on the threadpool. |
| 696 | function paramsAfterFlushCallback(level, strategy, callback) { |
| 697 | assert(this._handle, 'zlib binding closed'); |
| 698 | this._handle.params(level, strategy); |
| 699 | if (!this.destroyed) { |
| 700 | this._level = level; |
| 701 | this._strategy = strategy; |
| 702 | if (callback) callback(); |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | Zlib.prototype.params = function params(level, strategy, callback) { |
| 707 | checkRangesOrGetDefault(level, 'level', Z_MIN_LEVEL, Z_MAX_LEVEL); |