mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-03-01 10:35:36 +01:00
Use no back end compression for blocks smaller than 64 bytes to avoid issues to do with minimum buffer size and minimum match sizes of the rzip preprocessing.
This commit is contained in:
parent
9430b6ff4a
commit
081265f1c9
6
stream.c
6
stream.c
|
|
@ -1267,7 +1267,11 @@ static void *compthread(void *data)
|
|||
* of succeeding in allocating more ram */
|
||||
fsync(ctis->fd);
|
||||
retry:
|
||||
if (!NO_COMPRESS && cti->c_len) {
|
||||
/* Very small buffers have issues to do with minimum amounts of ram
|
||||
* allocatable to a buffer combined with the MINIMUM_MATCH of rzip
|
||||
* being 31 bytes so don't bother trying to compress anything less
|
||||
* than 64 bytes. */
|
||||
if (!NO_COMPRESS && cti->c_len >= 64) {
|
||||
if (LZMA_COMPRESS)
|
||||
ret = lzma_compress_buf(control, cti);
|
||||
else if (LZO_COMPRESS)
|
||||
|
|
|
|||
Loading…
Reference in a new issue