]> wimlib.net Git - wimlib/commitdiff
wimexport: Add --compress-slow option
authorEric Biggers <ebiggers3@gmail.com>
Fri, 24 Jan 2014 19:03:33 +0000 (13:03 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 24 Jan 2014 22:36:24 +0000 (16:36 -0600)
doc/imagex-export.1.in
programs/imagex.c

index 3330a231196c55d019960b59bc243fe258ba0e36..bd24e36cd1a374447d93e1b249a980ab0d8d5ae4 100644 (file)
@@ -79,6 +79,12 @@ and "LZX", instead of "fast" and "maximum", respectively.
 reduced compatibility.  See the documentation for this option to
 \fB@IMAGEX_PROGNAME@ capture\fR (1) for more details.
 .TP
+\fB--compress-slow\fR
+Spend even more time compressing the data to achieve a very slightly better
+compression ratio.  This currently only has an effect for LZX ("maximum") and
+LZMS ("recovery") compression.  This option does not itself set the compression
+format.
+.TP
 \fB--pack-streams\fR, \fB--solid\fR
 Create a "solid" archive that compresses multiple files together.  This can
 result in a higher compression ratio, but has disadvantages such as reduced
index 7914573f59fa45a5213e610316ae7eae817c371f..c1d436e1b11113f3449c8e190df95ba92e447b62 100644 (file)
@@ -271,6 +271,7 @@ static const struct option export_options[] = {
        {T("nocheck"),     no_argument,       NULL, IMAGEX_NOCHECK_OPTION},
        {T("no-check"),    no_argument,       NULL, IMAGEX_NOCHECK_OPTION},
        {T("compress"),    required_argument, NULL, IMAGEX_COMPRESS_OPTION},
+       {T("compress-slow"), no_argument,     NULL, IMAGEX_COMPRESS_SLOW_OPTION},
        {T("pack-streams"),no_argument,       NULL, IMAGEX_PACK_STREAMS_OPTION},
        {T("solid"),       no_argument,       NULL, IMAGEX_PACK_STREAMS_OPTION},
        {T("chunk-size"),  required_argument, NULL, IMAGEX_CHUNK_SIZE_OPTION},
@@ -2731,6 +2732,10 @@ imagex_export(int argc, tchar **argv, int cmd)
                        if (compression_type == WIMLIB_COMPRESSION_TYPE_INVALID)
                                goto out_err;
                        break;
+               case IMAGEX_COMPRESS_SLOW_OPTION:
+                       write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS;
+                       set_compress_slow();
+                       break;
                case IMAGEX_PACK_STREAMS_OPTION:
                        write_flags |= WIMLIB_WRITE_FLAG_PACK_STREAMS;
                        break;