aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-01-31 15:42:45 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-01-31 15:42:45 +0100
commit8fd35a1fa629daed5e4e580e72993df7654f0a5e (patch)
tree86fb79339c6824d1c080cbc8169177d9e9488d94
parent468731a86b850f6f1430a81b87cd7e2288300101 (diff)
downloadbusybox-w32-8fd35a1fa629daed5e4e580e72993df7654f0a5e.tar.gz
busybox-w32-8fd35a1fa629daed5e4e580e72993df7654f0a5e.tar.bz2
busybox-w32-8fd35a1fa629daed5e4e580e72993df7654f0a5e.zip
gzip: code shrink
function old new delta pack_gzip 861 838 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/gzip.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index fa7a79b04..d52167f84 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2049,20 +2049,24 @@ static void ct_init(void)
2049 n = 0; 2049 n = 0;
2050 while (n <= 143) { 2050 while (n <= 143) {
2051 G2.static_ltree[n++].Len = 8; 2051 G2.static_ltree[n++].Len = 8;
2052 G2.bl_count[8]++; 2052 //G2.bl_count[8]++;
2053 } 2053 }
2054 //G2.bl_count[8] = 143 + 1;
2054 while (n <= 255) { 2055 while (n <= 255) {
2055 G2.static_ltree[n++].Len = 9; 2056 G2.static_ltree[n++].Len = 9;
2056 G2.bl_count[9]++; 2057 //G2.bl_count[9]++;
2057 } 2058 }
2059 G2.bl_count[9] = 255 - 143;
2058 while (n <= 279) { 2060 while (n <= 279) {
2059 G2.static_ltree[n++].Len = 7; 2061 G2.static_ltree[n++].Len = 7;
2060 G2.bl_count[7]++; 2062 //G2.bl_count[7]++;
2061 } 2063 }
2064 G2.bl_count[7] = 279 - 255;
2062 while (n <= 287) { 2065 while (n <= 287) {
2063 G2.static_ltree[n++].Len = 8; 2066 G2.static_ltree[n++].Len = 8;
2064 G2.bl_count[8]++; 2067 //G2.bl_count[8]++;
2065 } 2068 }
2069 G2.bl_count[8] = 287 - 279 + (143 + 1);
2066 /* Codes 286 and 287 do not exist, but we must include them in the 2070 /* Codes 286 and 287 do not exist, but we must include them in the
2067 * tree construction to get a canonical Huffman tree (longest code 2071 * tree construction to get a canonical Huffman tree (longest code
2068 * all ones) 2072 * all ones)