- `wimupdate` now supports the `--ref` option. It should be specified when
updating a delta WIM to avoid two minor issues.
+- `wimoptimize` now has better default behavior when converting to and from
+ solid archives, i.e. WIM <=> ESD. It now is consistent with `wimcapture` and
+ `wimexport`. For WIM => ESD, `wimoptimize --solid` now works. Before, the
+ needed command was `wimoptimize --solid --compress=LZMS --chunk-size=128K`.
+ For ESD => WIM, `wimoptimize --compress=LZX` now works. Before, the needed
+ command was `wimoptimize --compress=LZX --chunk-size=32K`.
+
- Removed support for Windows XP.
- Added a GitHub Actions workflow that tests wimlib.
.br
mv install.wim install.esd
.RE
+.PP
+Turn 'install.esd' back into 'install.wim':
+.RS
+.PP
+wimoptimize install.wim --compress=LZX
+.br
+mv install.esd install.wim
+.RE
.SH SEE ALSO
.BR wimlib-imagex (1)
.BR wimexport (1)
int solid_ctype = WIMLIB_COMPRESSION_TYPE_INVALID;
int ret;
WIMStruct *wim;
+ struct wimlib_wim_info info;
const tchar *wimfile;
off_t old_size;
off_t new_size;
case IMAGEX_SOLID_OPTION:
write_flags |= WIMLIB_WRITE_FLAG_SOLID;
write_flags |= WIMLIB_WRITE_FLAG_RECOMPRESS;
+ /* Reset the non-solid compression type to LZMS. */
+ if (compression_type == WIMLIB_COMPRESSION_TYPE_INVALID)
+ compression_type = WIMLIB_COMPRESSION_TYPE_LZMS;
break;
case IMAGEX_NO_SOLID_SORT_OPTION:
write_flags |= WIMLIB_WRITE_FLAG_NO_SOLID_SORT;
if (ret)
goto out;
- if (compression_type != WIMLIB_COMPRESSION_TYPE_INVALID) {
+ wimlib_get_wim_info(wim, &info);
+
+ if (compression_type != WIMLIB_COMPRESSION_TYPE_INVALID &&
+ compression_type != info.compression_type) {
/* Change compression type. */
ret = wimlib_set_output_compression_type(wim, compression_type);
if (ret)
goto out_wimlib_free;
+
+ /* Reset the chunk size. */
+ if (chunk_size == UINT32_MAX)
+ chunk_size = 0;
}
if (chunk_size != UINT32_MAX) {