]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove FORCE_STATIC and FORCE_STORED
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 9 Sep 2020 09:21:49 +0000 (11:21 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 11 Sep 2020 10:30:36 +0000 (12:30 +0200)
trees.c

diff --git a/trees.c b/trees.c
index 2d1cccbb439c94dc5864b1cc68e5e0d65a54ee6f..593d77390f29c2000284cbc579b0be8a6ed8049d 100644 (file)
--- 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);