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());