diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-05-21 21:18:35 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-05-21 21:24:28 +0200 |
commit | b9b3b7663dffb83e112b5a4aaf786fcab23182fa (patch) | |
tree | 68eba521952284614e3725fc524ea3cc136ea714 /lib/sqfs/comp | |
parent | e942ed9b277cd8058e9ab1b5a762ee399f5231f0 (diff) |
Fix: zstd: actually set the compression level from the options
In the zstd compressor, the compression level from the configuration
structure wasn't used at all. Instead, the zstd compressor was told
to use level 0 and compressor options with that parameter were written
to disk.
This commit makes sure the level parameter is propperly initialized.
Reported-by: Sébastien Gross
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/comp')
-rw-r--r-- | lib/sqfs/comp/zstd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqfs/comp/zstd.c b/lib/sqfs/comp/zstd.c index 986c669..18289fe 100644 --- a/lib/sqfs/comp/zstd.c +++ b/lib/sqfs/comp/zstd.c @@ -154,6 +154,7 @@ int zstd_compressor_create(const sqfs_compressor_config_t *cfg, return SQFS_ERROR_ALLOC; zstd->block_size = cfg->block_size; + zstd->level = cfg->opt.zstd.level; zstd->zctx = ZSTD_createCCtx(); if (zstd->zctx == NULL) { free(zstd); |