Removed orphaned 'FASTEST' #ifdefs emulation

This commit is contained in:
Vitaly Puzrin 2014-02-14 06:41:20 +04:00
parent 806e23d9ca
commit b13f5f1de8

View file

@ -5,8 +5,6 @@ var utils = require('./utils');
var trees = require('./trees');
var adler32 = require('./adler32');
var FASTEST = true;
var Z_NULL = c.Z_NULL;
var MAX_WBITS = 15;
@ -178,7 +176,6 @@ function fill_window(s) {
} while (--n);
n = wsize;
if (FASTEST) {
p = n;
do {
m = s.head[--p];
@ -187,7 +184,7 @@ function fill_window(s) {
* its value will never be used.
*/
} while (--n);
}
more += wsize;
}
if (s.strm.avail_in === 0) {
@ -219,9 +216,7 @@ function fill_window(s) {
//#endif
while (s.insert) {
s.ins_h = update_hash(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
if (FASTEST) {
s.prev[str & s.w_mask] = s.head[s.ins_h];
}
s.head[s.ins_h] = str;
str++;
s.insert--;
@ -421,13 +416,6 @@ var Config = function (good_length, max_lazy, nice_length, max_chain, func) {
var configuration_table;
if (FASTEST) {
configuration_table = [
/* good lazy nice chain */
new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */
new Config(4, 4, 8, 4, deflate_fast) /* 1 max speed, no lazy matches */
];
} else {
configuration_table = [
/* good lazy nice chain */
new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */
@ -442,7 +430,6 @@ if (FASTEST) {
new Config(32, 128, 258, 1024, deflate_slow), /* 8 */
new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */
];
}
/* ===========================================================================
* Initialize the "longest match" routines for a new zlib stream
@ -609,15 +596,9 @@ function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
}
var wrap = 1;
if (FASTEST) {
if (level !== 0) {
level = 1;
}
} else {
if (level === c.Z_DEFAULT_COMPRESSION) {
level = 6;
}
}
if (windowBits < 0) { /* suppress zlib wrapper */
wrap = 0;