From: Eric Biggers Date: Wed, 25 Jun 2014 02:48:43 +0000 (-0500) Subject: wimexport: Add --recompress option X-Git-Tag: v1.7.1~79 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=9f4d013f39fef92d3fb733bbfa61cb5307699b21;hp=ce4af1bc0291503cae1b053d53efbc4123c50be5 wimexport: Add --recompress option --- diff --git a/doc/man1/imagex-export.1.in b/doc/man1/imagex-export.1.in index 236afeeb..73e01f63 100644 --- a/doc/man1/imagex-export.1.in +++ b/doc/man1/imagex-export.1.in @@ -79,6 +79,10 @@ 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--recompress\fR +Force all exported data to be recompressed, even if the destination WIM will use +the same compression type as the source WIM. +.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 diff --git a/programs/imagex.c b/programs/imagex.c index 50803014..1c077b7f 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -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("recompress"), no_argument, NULL, IMAGEX_RECOMPRESS_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}, @@ -2612,6 +2613,9 @@ imagex_export(int argc, tchar **argv, int cmd) if (compression_type == WIMLIB_COMPRESSION_TYPE_INVALID) goto out_err; break; + case IMAGEX_RECOMPRESS_OPTION: + write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS; + break; case IMAGEX_COMPRESS_SLOW_OPTION: write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS; set_compress_slow();