]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
lzx-compress.c: Minor cleanups
[wimlib] / programs / imagex.c
index 81f2f9f6a7b9aa392488e8e930dd6657dbed5133..1c077b7f2fae1afb1db12fc53cf0c99b8894c4a1 100644 (file)
@@ -46,6 +46,8 @@
 #  include <alloca.h>
 #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();