From 731a41d6d86be9c27e9f1f99bb35ee3772cb0f61 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 24 Jan 2014 13:03:33 -0600 Subject: [PATCH] wimexport: Add --compress-slow option --- doc/imagex-export.1.in | 6 ++++++ programs/imagex.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/doc/imagex-export.1.in b/doc/imagex-export.1.in index 3330a231..bd24e36c 100644 --- a/doc/imagex-export.1.in +++ b/doc/imagex-export.1.in @@ -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 diff --git a/programs/imagex.c b/programs/imagex.c index 7914573f..c1d436e1 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("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; -- 2.43.0