diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:23:45 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:23:45 -0700 |
commit | 7a6955760ba950eb82f57929f8f6c9847c65f0af (patch) | |
tree | e2cd657aca6d606e0b28bf57fe45e914717a334c /trees.c | |
parent | f0e76a6634eb26e3ddc6dfc6f2489553eff8c8f4 (diff) | |
download | zlib-7a6955760ba950eb82f57929f8f6c9847c65f0af.tar.gz zlib-7a6955760ba950eb82f57929f8f6c9847c65f0af.tar.bz2 zlib-7a6955760ba950eb82f57929f8f6c9847c65f0af.zip |
zlib 1.2.1.2v1.2.1.2
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 | /* =========================================================================== |