summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDaniel Edgecumbe2019-09-02 22:03:14 +0100
committerDenys Vlasenko2019-09-05 13:26:58 +0200
commitde82f0b764de4720fed3378f2e5f938a3f4b9d18 (patch)
treea3f2cc7ad9e8b25160018bf951c6aa3027ec86dc /archival
parent10509a70ee5c28800d23bf891b4f72603447e364 (diff)
downloadbusybox-de82f0b764de4720fed3378f2e5f938a3f4b9d18.zip
busybox-de82f0b764de4720fed3378f2e5f938a3f4b9d18.tar.gz
gzip: default level with ENABLE_FEATURE_GZIP_LEVELS should be 6
Fixes an off-by-one that actually resulted in level 7 being used Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/gzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 17341de..37db347 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2222,7 +2222,7 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_GZIP_LEVELS
opt >>= (BBUNPK_OPTSTRLEN IF_FEATURE_GZIP_DECOMPRESS(+ 2) + 1); /* drop cfkvq[dt]n bits */
if (opt == 0)
- opt = 1 << 6; /* default: 6 */
+ opt = 1 << 5; /* default: 6 */
opt = ffs(opt >> 4); /* Maps -1..-4 to [0], -5 to [1] ... -9 to [5] */
max_chain_length = 1 << gzip_level_config[opt].chain_shift;
good_match = gzip_level_config[opt].good;