X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=programs%2Fimagex.c;h=1c077b7f2fae1afb1db12fc53cf0c99b8894c4a1;hp=81f2f9f6a7b9aa392488e8e930dd6657dbed5133;hb=9f4d013f39fef92d3fb733bbfa61cb5307699b21;hpb=157ec1472cea867b62aa59405fe9023aa0549399 diff --git a/programs/imagex.c b/programs/imagex.c index 81f2f9f6..1c077b7f 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -46,6 +46,8 @@ # include #endif +#define WIMLIB_COMPRESSION_TYPE_INVALID (-1) + #ifdef __WIN32__ # include "imagex-win32.h" # define print_security_descriptor win32_print_security_descriptor @@ -269,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}, @@ -2610,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();