]> wimlib.net Git - wimlib/commitdiff
wimexport: Add --recompress option
authorEric Biggers <ebiggers3@gmail.com>
Wed, 25 Jun 2014 02:48:43 +0000 (21:48 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 25 Jun 2014 02:50:21 +0000 (21:50 -0500)
doc/man1/imagex-export.1.in
programs/imagex.c

index 236afeeba1acca25d0f556f55ec84e82640482da..73e01f63b91b7fcf010cfe7af3b71bf22df7c01e 100644 (file)
@@ -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
 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
 \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
index 508030148b1e15925b4fd062347a0741f7642dfb..1c077b7f2fae1afb1db12fc53cf0c99b8894c4a1 100644 (file)
@@ -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("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},
        {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;
                        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();
                case IMAGEX_COMPRESS_SLOW_OPTION:
                        write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS;
                        set_compress_slow();