diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-31 17:37:32 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-31 17:37:32 +0100 |
commit | 919bc9d43c47a206e632c1b4c80c5f23e307b176 (patch) | |
tree | 18729058c9607d5fe2777bcdb5e7d2094b31731c | |
parent | f21ebeece53687b17d64fa444ceb3648439f5a8a (diff) | |
download | busybox-w32-919bc9d43c47a206e632c1b4c80c5f23e307b176.tar.gz busybox-w32-919bc9d43c47a206e632c1b4c80c5f23e307b176.tar.bz2 busybox-w32-919bc9d43c47a206e632c1b4c80c5f23e307b176.zip |
gzip: flush output buffer after stored blocks only if necessary
function old new delta
flush_block 671 680 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | archival/gzip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 7df38c2bc..92130e7fb 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -634,7 +634,8 @@ static void copy_block(char *buf, unsigned len, int header) | |||
634 | put_8bit(*buf++); | 634 | put_8bit(*buf++); |
635 | } | 635 | } |
636 | /* The above can 32-bit misalign outbuf */ | 636 | /* The above can 32-bit misalign outbuf */ |
637 | flush_outbuf_if_32bit_optimized(); | 637 | if (G1.outcnt & 3) /* syscalls are expensive, is it really misaligned? */ |
638 | flush_outbuf_if_32bit_optimized(); | ||
638 | } | 639 | } |
639 | 640 | ||
640 | 641 | ||