diff options
Diffstat (limited to 'trees.c')
-rw-r--r-- | trees.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -931,7 +931,7 @@ void _tr_flush_block(s, buf, stored_len, eof) | |||
931 | if (s->level > 0) { | 931 | if (s->level > 0) { |
932 | 932 | ||
933 | /* Check if the file is ascii or binary */ | 933 | /* Check if the file is ascii or binary */ |
934 | if (s->data_type == Z_UNKNOWN) set_data_type(s); | 934 | if (s->strm->data_type == Z_UNKNOWN) set_data_type(s); |
935 | 935 | ||
936 | /* Construct the literal and distance trees */ | 936 | /* Construct the literal and distance trees */ |
937 | build_tree(s, (tree_desc *)(&(s->l_desc))); | 937 | build_tree(s, (tree_desc *)(&(s->l_desc))); |
@@ -1131,7 +1131,7 @@ local void set_data_type(s) | |||
1131 | while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; | 1131 | while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; |
1132 | while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; | 1132 | while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; |
1133 | while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; | 1133 | while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; |
1134 | s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII); | 1134 | s->strm->data_type = bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII; |
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | /* =========================================================================== | 1137 | /* =========================================================================== |