diff --git a/lib/deflate.js b/lib/deflate.js index 7ce5cf5..2e29d62 100644 --- a/lib/deflate.js +++ b/lib/deflate.js @@ -95,7 +95,7 @@ Deflate.prototype.push = function(data, mode) { if (this.ended) { return false; } - _mode = (mode === true) ? c.Z_FINISH : (isNaN(mode) ? c.Z_NO_FLUSH : mode); + _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); strm.next_in = data; strm.next_in_index = 0;