From: Eric Biggers Date: Sun, 8 Dec 2013 08:26:55 +0000 (-0600) Subject: wimoptimize: Add --recompress-slow, imply --recompress X-Git-Tag: v1.5.3~4 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=21debdc578194ba5fec47f363e12a15f77b2c5b2;hp=b2c8be8200a7ac6de83dc5aabb75e46b9ea16708 wimoptimize: Add --recompress-slow, imply --recompress --- diff --git a/doc/imagex-optimize.1.in b/doc/imagex-optimize.1.in index 52b90c2a..9f3856af 100644 --- a/doc/imagex-optimize.1.in +++ b/doc/imagex-optimize.1.in @@ -36,11 +36,11 @@ verify that the WIM is intact (equivalent to applying all the images from it). Note: as of wimlib v1.5.3, wimlib's LZX compressor usually achieves the same or better compression than Microsoft's, but is slightly slower. .TP -\fB--compress-slow -For LZX compression only: spend even more time compressing the data in order to -achieve a more optimal compression ratio. This will make compression about -twice as slow and will increase the compression ratio by maybe 1%, if you're -lucky. +\fB--recompress-slow\fR, \fB--compress-slow\fR +Spend even more time compressing the data in order to achieve a more optimal +compression ratio. This only affects LZX-compressed WIM files. Compared to the +default \fB--recompress\fR, this will make compression about twice as slow and +will increase the compression ratio by maybe 1%, depending on the data. .TP \fB--threads\fR=\fINUM_THREADS\fR Number of threads to use for compressing data. Default: autodetect (number of diff --git a/programs/imagex.c b/programs/imagex.c index 1525f39c..67903256 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -284,6 +284,7 @@ static const struct option optimize_options[] = { {T("no-check"), no_argument, NULL, IMAGEX_NOCHECK_OPTION}, {T("recompress"), no_argument, NULL, IMAGEX_RECOMPRESS_OPTION}, {T("compress-slow"), no_argument, NULL, IMAGEX_COMPRESS_SLOW_OPTION}, + {T("recompress-slow"), no_argument, NULL, IMAGEX_COMPRESS_SLOW_OPTION}, {T("threads"), required_argument, NULL, IMAGEX_THREADS_OPTION}, {T("pipable"), no_argument, NULL, IMAGEX_PIPABLE_OPTION}, {T("not-pipable"), no_argument, NULL, IMAGEX_NOT_PIPABLE_OPTION}, @@ -3259,6 +3260,7 @@ imagex_optimize(int argc, tchar **argv, int cmd) write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS; break; case IMAGEX_COMPRESS_SLOW_OPTION: + write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS; set_compress_slow(); break; case IMAGEX_THREADS_OPTION: @@ -3752,7 +3754,7 @@ T( [CMD_OPTIMIZE] = T( " %"TS" WIMFILE [--check] [--nocheck] [--recompress]\n" -" [--compress-slow] [--threads=NUM_THREADS] [--pipable]\n" +" [--recompress-slow] [--threads=NUM_THREADS] [--pipable]\n" " [--not-pipable]\n" ), [CMD_SPLIT] =