]> wimlib.net Git - wimlib/blob - doc/man1/imagex-optimize.1.in
338fdaed091e1f10c906941d5349f7641e03db0c
[wimlib] / doc / man1 / imagex-optimize.1.in
1 .TH WIMLIB-IMAGEX "1" "November 2014" "wimlib-imagex @VERSION@" "User Commands"
2 .SH NAME
3 wimlib-imagex-optimize \- Optimize a WIM archive
4 .SH SYNOPSIS
5 \fBwimlib-imagex optimize\fR \fIWIMFILE\fR [\fIOPTION\fR...]
6 .SH DESCRIPTION
7 \fBwimlib-imagex optimize\fR will rebuild the stand-alone WIM \fIWIMFILE\fR.  The new
8 WIM is written to a temporary file, and it is renamed to the original file when
9 it's ready.  This action will remove any holes that have been left as a result
10 of appending images, so the new WIM may be slightly smaller than the old WIM.
11 .PP
12 By default, compressed data will be re-used, and not recompressed.  Use the
13 \fB--recompress\fR or \fB--compress\fR=\fITYPE\fR[:\fILEVEL\fR] option to
14 request recompression.
15 .PP
16 This command is also available as simply \fBwimoptimize\fR if the appropriate
17 hard link or batch file has been installed.
18 .SH OPTIONS
19 .TP 6
20 \fB--check\fR
21 When reading \fIWIMFILE\fR, verify its integrity if an integrity table is
22 present.  In addition, include an integrity table in the optimized WIM.  If this
23 option is not specified, by default the integrity table (if present) is not
24 checked, and an integrity table is included in the rebuilt WIM if and only if
25 one was present in the original WIM.
26 .TP
27 \fB--nocheck\fR
28 Neither verify the integrity of \fIWIMFILE\fR using the integrity table, nor
29 include an integrity table in the rebuilt WIM file.
30 .TP
31 \fB--recompress\fR
32 Recompress all compressed streams in \fIWIMFILE\fR when rebuilding it.  This
33 will greatly increase the time needed to rebuild the WIM file, but it may result
34 in a better compression ratio if wimlib can do a better job than the program
35 that wrote the original file.
36 .TP
37 \fB--compress\fR=\fITYPE\fR[:\fILEVEL\fR]
38 Recompress the WIM file using the specified compression type, and optionally the
39 specified compression level for that compression type.  This implies
40 \fB--recompress\fR.
41 .IP ""
42 See the documentation for this option to \fBwimlib-imagex capture\fR (1) for
43 more details.
44 .TP
45 \fB--chunk-size\fR=\fISIZE\fR
46 Set the WIM compression chunk size to \fISIZE\fR.  See the documentation for
47 this option to \fBwimlib-imagex capture\fR (1) for more details.
48 .TP
49 \fB--solid\fR
50 Create a "solid" archive that compresses multiple files together.  This can
51 result in a higher compression ratio, but has disadvantages such as reduced
52 compatibility.  See the documentation for this option to \fBwimlib-imagex
53 capture\fR (1) for more details.
54 .TP
55 \fB--solid-chunk-size\fR=\fISIZE\fR
56 Like \fB--chunk-size\fR, but set the chunk size used in solid blocks.  See the
57 documentation for this option to \fBwimlib-imagex capture\fR (1) for more
58 details.
59 .TP
60 \fB--solid-compress\fR=\fITYPE\fR[:\fILEVEL\fR]
61 Like \fB--compress\fR, but set the compression type used in solid blocks.  See
62 the documentation for this option to \fBwimlib-imagex capture\fR (1) for
63 more details.
64 .TP
65 \fB--threads\fR=\fINUM_THREADS\fR
66 Number of threads to use for compressing data.  Default: autodetect (number of
67 processors).  This parameter only has an effect when data recompression is
68 requested.
69 .TP
70 \fB--pipable\fR
71 Rebuild the WIM so that it can be applied fully sequentially, including from a
72 pipe.  See \fBwimlib-imagex capture\fR(1) for more details about creating
73 pipable WIMs.  By default, when neither \fB--pipable\fR or \fB--not-pipable\fR
74 is specified, the rebuilt WIM will be pipable if and only if it was already
75 pipable.
76 .TP
77 \fB--not-pipable\fR
78 Rebuild the WIM in the non-pipable format.  (This is the default if
79 \fIWIMFILE\fR is not pipable.)
80 .SH NOTES
81 \fBwimlib-imagex optimize\fR does not support split WIMs.
82 .PP
83 \fBwimlib-imagex optimize\fR is roughly equivalent to:
84 .RS
85 .PP
86 \fBwimlib-imagex export\fR \fIWIMFILE\fR all tmp.wim && mv tmp.wim \fIWIMFILE\fR
87 .RE
88 .PP
89 .SH EXAMPLES
90 Rebuild the WIM file 'install.wim':
91 .RS
92 .PP
93 wimoptimize install.wim
94 .RE
95 .PP
96 Rebuild and recompress the WIM file 'install.wim':
97 .RS
98 .PP
99 wimoptimize install.wim --recompress
100 .RE
101 .PP
102 Rebuild and recompress the WIM file 'install.wim', using "maximum" (LZX)
103 compression at a higher-than-default compression level.  The compression chunk
104 size remains unchanged.  This command will be slow, but it might be useful for
105 optimizing files for distribution.  See the COMPRESSION RATIO section of the
106 README file for some benchmark results.
107 .RS
108 .PP
109 wimoptimize install.wim --compress=maximum:100
110 .RE
111 .PP
112 .SH SEE ALSO
113 .BR wimlib-imagex (1)
114 .BR wimlib-imagex-export (1)
115 .BR wimlib-imagex-verify (1)