diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
commit | 6ca409e0e4c198fe3081346eebbae3f068fe605a (patch) | |
tree | 060cb05d99220a1eda399194d1209c269f0e8cd8 /archival/gzip.c | |
parent | 4185548984357df91311f30c8e43d95f33922576 (diff) | |
download | busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2 busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip |
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
Diffstat (limited to 'archival/gzip.c')
-rw-r--r-- | archival/gzip.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 08c660e40..83d78e47c 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -768,26 +768,24 @@ static void check_match(IPos start, IPos match, int length) | |||
768 | #define BL_CODES 19 | 768 | #define BL_CODES 19 |
769 | /* number of codes used to transfer the bit lengths */ | 769 | /* number of codes used to transfer the bit lengths */ |
770 | 770 | ||
771 | typedef uch extra_bits_t; | ||
772 | |||
773 | /* extra bits for each length code */ | 771 | /* extra bits for each length code */ |
774 | static const extra_bits_t extra_lbits[LENGTH_CODES]= { | 772 | static const uint8_t extra_lbits[LENGTH_CODES] ALIGN1 = { |
775 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, | 773 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, |
776 | 4, 4, 5, 5, 5, 5, 0 | 774 | 4, 4, 5, 5, 5, 5, 0 |
777 | }; | 775 | }; |
778 | 776 | ||
779 | /* extra bits for each distance code */ | 777 | /* extra bits for each distance code */ |
780 | static const extra_bits_t extra_dbits[D_CODES] = { | 778 | static const uint8_t extra_dbits[D_CODES] ALIGN1 = { |
781 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, | 779 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, |
782 | 10, 10, 11, 11, 12, 12, 13, 13 | 780 | 10, 10, 11, 11, 12, 12, 13, 13 |
783 | }; | 781 | }; |
784 | 782 | ||
785 | /* extra bits for each bit length code */ | 783 | /* extra bits for each bit length code */ |
786 | static const extra_bits_t extra_blbits[BL_CODES] = { | 784 | static const uint8_t extra_blbits[BL_CODES] ALIGN1 = { |
787 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 }; | 785 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 }; |
788 | 786 | ||
789 | /* number of codes at each bit length for an optimal tree */ | 787 | /* number of codes at each bit length for an optimal tree */ |
790 | static const uch bl_order[BL_CODES] = { | 788 | static const uint8_t bl_order[BL_CODES] ALIGN1 = { |
791 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; | 789 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; |
792 | 790 | ||
793 | #define STORED_BLOCK 0 | 791 | #define STORED_BLOCK 0 |
@@ -861,7 +859,7 @@ typedef struct ct_data { | |||
861 | typedef struct tree_desc { | 859 | typedef struct tree_desc { |
862 | ct_data *dyn_tree; /* the dynamic tree */ | 860 | ct_data *dyn_tree; /* the dynamic tree */ |
863 | ct_data *static_tree; /* corresponding static tree or NULL */ | 861 | ct_data *static_tree; /* corresponding static tree or NULL */ |
864 | const extra_bits_t *extra_bits; /* extra bits for each code or NULL */ | 862 | const uint8_t *extra_bits; /* extra bits for each code or NULL */ |
865 | int extra_base; /* base index for extra_bits */ | 863 | int extra_base; /* base index for extra_bits */ |
866 | int elems; /* max number of elements in the tree */ | 864 | int elems; /* max number of elements in the tree */ |
867 | int max_length; /* max bit length for the codes */ | 865 | int max_length; /* max bit length for the codes */ |
@@ -1064,7 +1062,7 @@ static void pqdownheap(ct_data * tree, int k) | |||
1064 | static void gen_bitlen(tree_desc * desc) | 1062 | static void gen_bitlen(tree_desc * desc) |
1065 | { | 1063 | { |
1066 | ct_data *tree = desc->dyn_tree; | 1064 | ct_data *tree = desc->dyn_tree; |
1067 | const extra_bits_t *extra = desc->extra_bits; | 1065 | const uint8_t *extra = desc->extra_bits; |
1068 | int base = desc->extra_base; | 1066 | int base = desc->extra_base; |
1069 | int max_code = desc->max_code; | 1067 | int max_code = desc->max_code; |
1070 | int max_length = desc->max_length; | 1068 | int max_length = desc->max_length; |