From 004da59988e41e68a1d56ba54224bdeaa65b89cf Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 15 May 2020 21:10:45 +0200 Subject: [PATCH] Default to zstd compression level 1 After some experiments my evaluation is that the increased compression ratio of level 1 is worth the very slight decrease in compression speed. --- doc/MANUAL.adoc | 2 +- src/ZstdCompressor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 3094a945c..b2ac1d4e9 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -382,7 +382,7 @@ Semantics of *compression_level*: the *zstd* command line tool. *0* (default):: The value *0* means that ccache will choose a suitable level, currently - *-1*. + *1*. -- [[config_cpp_extension]] *cpp_extension* (*CCACHE_EXTENSION*):: diff --git a/src/ZstdCompressor.cpp b/src/ZstdCompressor.cpp index beaa5896d..37ea7e3f2 100644 --- a/src/ZstdCompressor.cpp +++ b/src/ZstdCompressor.cpp @@ -21,7 +21,7 @@ #include "exceptions.hpp" #include "logging.hpp" -const uint8_t k_default_zstd_compression_level = -1; +const uint8_t k_default_zstd_compression_level = 1; ZstdCompressor::ZstdCompressor(FILE* stream, int8_t compression_level) : m_stream(stream), m_zstd_stream(ZSTD_createCStream()) -- 2.47.3