mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-06 23:04:04 +00:00
Update version number to 0.544.
Change suggested maximum compression in README to disable threading with -p 1. Use bzip2 as a fallback compression when lzma fails due to internal memory errors as may happen on 32 bits.
This commit is contained in:
parent
23e89b06af
commit
c3dfcfcec1
5 changed files with 26 additions and 19 deletions
10
stream.c
10
stream.c
|
|
@ -288,7 +288,7 @@ static void lzma_compress_buf(struct compress_thread *cthread)
|
|||
if (lzma_ret != SZ_OK) {
|
||||
switch (lzma_ret) {
|
||||
case SZ_ERROR_MEM:
|
||||
print_err("LZMA ERROR: %d. Try a smaller compression window.\n", SZ_ERROR_MEM);
|
||||
print_verbose("LZMA ERROR: %d. Can't allocate enough RAM for compression window.\n", SZ_ERROR_MEM);
|
||||
break;
|
||||
case SZ_ERROR_PARAM:
|
||||
print_err("LZMA Parameter ERROR: %d. This should not happen.\n", SZ_ERROR_PARAM);
|
||||
|
|
@ -304,8 +304,14 @@ static void lzma_compress_buf(struct compress_thread *cthread)
|
|||
break;
|
||||
}
|
||||
/* can pass -1 if not compressible! Thanks Lasse Collin */
|
||||
print_maxverbose("Incompressible block\n");
|
||||
free(c_buf);
|
||||
if (lzma_ret == SZ_ERROR_MEM) {
|
||||
/* lzma compress can be fragile on 32 bit. If it fails,
|
||||
* fall back to bzip2 compression so the block doesn't
|
||||
* remain uncompressed */
|
||||
print_verbose("Falling back to bzip2 compression.\n");
|
||||
bzip2_compress_buf(cthread);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((i64)dlen >= cthread->c_len) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue