diff options
Diffstat (limited to 'trees.c')
-rw-r--r-- | trees.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -934,22 +934,6 @@ void _tr_flush_block(s, buf, stored_len, eof) | |||
934 | if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) | 934 | if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) |
935 | set_data_type(s); | 935 | set_data_type(s); |
936 | 936 | ||
937 | #ifdef DEBUG | ||
938 | /* Write out literal/length frequencies for benchmarking */ | ||
939 | if (z_verbose) { | ||
940 | FILE *freq; | ||
941 | freq = fopen("defreq.txt", "a"); | ||
942 | if (freq != NULL) { | ||
943 | int n; | ||
944 | fputs("ltree:", freq); | ||
945 | for (n = 0; n < L_CODES; n++) | ||
946 | fprintf(freq, " %d", s->dyn_ltree[n].Freq); | ||
947 | putc('\n', freq); | ||
948 | fclose(freq); | ||
949 | } | ||
950 | } | ||
951 | #endif | ||
952 | |||
953 | /* Construct the literal and distance trees */ | 937 | /* Construct the literal and distance trees */ |
954 | build_tree(s, (tree_desc *)(&(s->l_desc))); | 938 | build_tree(s, (tree_desc *)(&(s->l_desc))); |
955 | Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, | 939 | Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, |
@@ -999,7 +983,7 @@ void _tr_flush_block(s, buf, stored_len, eof) | |||
999 | #ifdef FORCE_STATIC | 983 | #ifdef FORCE_STATIC |
1000 | } else if (static_lenb >= 0) { /* force static trees */ | 984 | } else if (static_lenb >= 0) { /* force static trees */ |
1001 | #else | 985 | #else |
1002 | } else if (static_lenb == opt_lenb) { | 986 | } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { |
1003 | #endif | 987 | #endif |
1004 | send_bits(s, (STATIC_TREES<<1)+eof, 3); | 988 | send_bits(s, (STATIC_TREES<<1)+eof, 3); |
1005 | compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); | 989 | compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); |