wok-6.x diff fusecloop/stuff/fusecloop.u @ rev 20207
Up tazlito (483)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 22 22:59:30 2018 +0100 (2018-02-22) |
parents | 792674d97726 |
children | 63cdeb5a1e77 |
line diff
1.1 --- a/fusecloop/stuff/fusecloop.u Wed Dec 14 21:23:06 2016 +0100 1.2 +++ b/fusecloop/stuff/fusecloop.u Thu Feb 22 22:59:30 2018 +0100 1.3 @@ -620,14 +620,14 @@ 1.4 +} 1.5 --- create_compressed_fs.c 1.6 +++ create_compressed_fs.c 1.7 -@@ -0,0 +1,224 @@ 1.8 +@@ -0,0 +1,225 @@ 1.9 +#ifdef FIND_BEST_COMPRESSION 1.10 +#include <compress.h> 1.11 +extern "C" { 1.12 +#include <stdlib.h> 1.13 +#include <string.h> 1.14 + 1.15 -+#define ZMAX 12 /* 12 compression levels with libdeflate, not 9 */ 1.16 ++#define ZMAX 9 1.17 +static shrink_t level; 1.18 +static int pass, iter; 1.19 +static int best_compress(unsigned char *compressed, 1.20 @@ -649,10 +649,11 @@ 1.21 + } 1.22 + buf[0] = compressed; 1.23 + buf[1] = buffer; 1.24 -+ for (i = j = 0; i <= ZMAX+2 && (pass == 0 || i < pass); i++) { 1.25 ++ for (i = j = 0; i <= ZMAX+3 && (pass == 0 || i < pass); i++) { 1.26 + llen = len = *compressed_len; 1.27 + if (i >= ZMAX+1) { 1.28 -+ level.level = (i == ZMAX+1) ? shrink_extra : shrink_insane; 1.29 ++ level.level = (i == ZMAX+1) ? shrink_normal : 1.30 ++ (i == ZMAX+2) ? shrink_extra : shrink_insane; 1.31 + err = (compress_zlib(level, buf[j], 1.32 + len, uncompressed, 1.33 + uncompressed_len)) ? Z_OK : Z_DATA_ERROR;