From d27f69308348cc46c651c38bea0a16a5c4c84925 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Thu, 10 Dec 2020 21:50:10 +0100 Subject: [PATCH] Default to best possible compression for block compressor --- src/dwarfs/block_compressor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dwarfs/block_compressor.cpp b/src/dwarfs/block_compressor.cpp index 5e9c26c6..64cfbbc9 100644 --- a/src/dwarfs/block_compressor.cpp +++ b/src/dwarfs/block_compressor.cpp @@ -466,11 +466,12 @@ block_compressor::block_compressor(const std::string& spec, size_t block_size) { impl_ = std::make_unique>(); } else if (om.choice() == "lz4hc") { impl_ = std::make_unique>( - om.get("level", 0)); + om.get("level", 9)); #endif #ifdef DWARFS_HAVE_LIBZSTD } else if (om.choice() == "zstd") { - impl_ = std::make_unique(om.get("level", 1)); + impl_ = std::make_unique( + om.get("level", ZSTD_maxCLevel())); #endif } else { throw std::runtime_error("unknown compression: " + om.choice());