[git commit] gunzip: code shrink by using int-, not short-sized struct member
Denys Vlasenko
vda.linux at googlemail.com
Sun Oct 20 17:07:06 UTC 2019
commit: https://git.busybox.net/busybox/commit/?id=fb1103595f0562f98505882150fed384dea72f39
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
inflate_block 1254 1253 -1
inflate_codes 629 621 -8
huft_build 1054 1008 -46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-55) Total: -55 bytes
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
archival/libarchive/decompress_gunzip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
index 530661e15..0f8173d0a 100644
--- a/archival/libarchive/decompress_gunzip.c
+++ b/archival/libarchive/decompress_gunzip.c
@@ -39,7 +39,8 @@ typedef struct huft_t {
unsigned char e; /* number of extra bits or operation */
unsigned char b; /* number of bits in this code or subcode */
union {
- unsigned short n; /* literal, length base, or distance base */
+ unsigned n; /* literal, length base, or distance base */
+ /* ^^^^^ was "unsigned short", but that results in larger code */
struct huft_t *t; /* pointer to next level of table */
} v;
} huft_t;
More information about the busybox-cvs
mailing list