mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-21 20:39:46 +01:00
pkg2sqfs: set lzma dictionary size to block size
It's the default the kernel implementation expects if no options are set. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
214a5e917e
commit
ac8e457c96
1 changed files with 6 additions and 1 deletions
|
@ -102,13 +102,18 @@ compressor_stream_t *sqfs_get_compressor(sqfs_super_t *s)
|
|||
{
|
||||
PKG_COMPRESSION id;
|
||||
compressor_t *cmp;
|
||||
size_t xz_dictsz;
|
||||
void *options;
|
||||
|
||||
switch (s->compression_id) {
|
||||
case SQFS_COMP_GZIP:
|
||||
id = PKG_COMPRESSION_ZLIB;
|
||||
options = NULL;
|
||||
break;
|
||||
case SQFS_COMP_XZ:
|
||||
id = PKG_COMPRESSION_LZMA;
|
||||
xz_dictsz = s->block_size;
|
||||
options = &xz_dictsz;
|
||||
break;
|
||||
default:
|
||||
fputs("unsupported compressor\n", stderr);
|
||||
|
@ -119,5 +124,5 @@ compressor_stream_t *sqfs_get_compressor(sqfs_super_t *s)
|
|||
if (cmp == NULL)
|
||||
return NULL;
|
||||
|
||||
return cmp->compression_stream(cmp);
|
||||
return cmp->compression_stream(cmp, options);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue