[git commit] gzip: flush output buffer after stored blocks only if necessary
Denys Vlasenko
vda.linux at googlemail.com
Wed Jan 31 16:37:32 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=919bc9d43c47a206e632c1b4c80c5f23e307b176
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
flush_block 671 680 +9
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
archival/gzip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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)
put_8bit(*buf++);
}
/* The above can 32-bit misalign outbuf */
- flush_outbuf_if_32bit_optimized();
+ if (G1.outcnt & 3) /* syscalls are expensive, is it really misaligned? */
+ flush_outbuf_if_32bit_optimized();
}
More information about the busybox-cvs
mailing list