From: Hans Kristian Rosbach Date: Wed, 9 Sep 2020 09:21:49 +0000 (+0200) Subject: Remove FORCE_STATIC and FORCE_STORED X-Git-Tag: 1.9.9-b1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3ae9634af291432cbf0ce73d9a14b31d7b301ba;p=thirdparty%2Fzlib-ng.git Remove FORCE_STATIC and FORCE_STORED --- diff --git a/trees.c b/trees.c index 2d1cccbb..593d7739 100644 --- a/trees.c +++ b/trees.c @@ -674,13 +674,9 @@ void Z_INTERNAL zng_tr_flush_block(deflate_state *s, char *buf, uint32_t stored_ opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ } -#ifdef FORCE_STORED - if (buf != NULL) { /* force stored block */ -#else if (stored_len+4 <= opt_lenb && buf != NULL) { - /* 4: two words for the lengths */ -#endif - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + /* 4: two words for the lengths + * The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. * Otherwise we can't have processed more than WSIZE input bytes since * the last block flush, because compression would have been * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to @@ -688,11 +684,7 @@ void Z_INTERNAL zng_tr_flush_block(deflate_state *s, char *buf, uint32_t stored_ */ zng_tr_stored_block(s, buf, stored_len, last); -#ifdef FORCE_STATIC - } else if (static_lenb >= 0) { /* force static trees */ -#else } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { -#endif zng_tr_emit_tree(s, STATIC_TREES, last); compress_block(s, (const ct_data *)static_ltree, (const ct_data *)static_dtree); cmpr_bits_add(s, s->static_len);