mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Small changes to control->threads and memory overhead for LZMA.
This commit is contained in:
parent
02a7bdc6c4
commit
1e16f7bd02
3
stream.c
3
stream.c
|
|
@ -325,7 +325,8 @@ retry:
|
|||
lzma_level,
|
||||
0, /* dict size. set default, choose by level */
|
||||
-1, -1, -1, -1, /* lc, lp, pb, fb */
|
||||
control->threads);
|
||||
control->threads > 1 ? 2: 1);
|
||||
/* LZMA spec has threads = 1 or 2 only. */
|
||||
if (lzma_ret != SZ_OK) {
|
||||
switch (lzma_ret) {
|
||||
case SZ_ERROR_MEM:
|
||||
|
|
|
|||
4
util.c
4
util.c
|
|
@ -117,7 +117,9 @@ void setup_overhead(rzip_control *control)
|
|||
i64 dictsize = (level <= 5 ? (1 << (level * 2 + 14)) :
|
||||
(level == 6 ? (1 << 25) : (1 << 26)));
|
||||
|
||||
control->overhead = (dictsize * 23 / 2) + (4 * 1024 * 1024);
|
||||
control->overhead = (dictsize * 23 / 2) + (6 * 1024 * 1024) + 16384;
|
||||
/* LZMA spec shows memory requirements as 6MB, not 4MB and state size
|
||||
* where default is 16KB */
|
||||
} else if (ZPAQ_COMPRESS)
|
||||
control->overhead = 112 * 1024 * 1024;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue