gzip: code shrink
function old new delta pack_gzip 861 838 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
468731a86b
commit
8fd35a1fa6
@ -2049,20 +2049,24 @@ static void ct_init(void)
|
|||||||
n = 0;
|
n = 0;
|
||||||
while (n <= 143) {
|
while (n <= 143) {
|
||||||
G2.static_ltree[n++].Len = 8;
|
G2.static_ltree[n++].Len = 8;
|
||||||
G2.bl_count[8]++;
|
//G2.bl_count[8]++;
|
||||||
}
|
}
|
||||||
|
//G2.bl_count[8] = 143 + 1;
|
||||||
while (n <= 255) {
|
while (n <= 255) {
|
||||||
G2.static_ltree[n++].Len = 9;
|
G2.static_ltree[n++].Len = 9;
|
||||||
G2.bl_count[9]++;
|
//G2.bl_count[9]++;
|
||||||
}
|
}
|
||||||
|
G2.bl_count[9] = 255 - 143;
|
||||||
while (n <= 279) {
|
while (n <= 279) {
|
||||||
G2.static_ltree[n++].Len = 7;
|
G2.static_ltree[n++].Len = 7;
|
||||||
G2.bl_count[7]++;
|
//G2.bl_count[7]++;
|
||||||
}
|
}
|
||||||
|
G2.bl_count[7] = 279 - 255;
|
||||||
while (n <= 287) {
|
while (n <= 287) {
|
||||||
G2.static_ltree[n++].Len = 8;
|
G2.static_ltree[n++].Len = 8;
|
||||||
G2.bl_count[8]++;
|
//G2.bl_count[8]++;
|
||||||
}
|
}
|
||||||
|
G2.bl_count[8] = 287 - 279 + (143 + 1);
|
||||||
/* Codes 286 and 287 do not exist, but we must include them in the
|
/* Codes 286 and 287 do not exist, but we must include them in the
|
||||||
* tree construction to get a canonical Huffman tree (longest code
|
* tree construction to get a canonical Huffman tree (longest code
|
||||||
* all ones)
|
* all ones)
|
||||||
|
Loading…
Reference in New Issue
Block a user