WIMs, which use a larger chunk size by default.
The compression/decompression API exported by wimlib has been changed.
- Now one set of functions support all supported compression formats.
+ Now one set of functions handles all supported compression formats.
`wimcapture' and `wimappend' will now display the progress of scanning
the directory tree to capture, in addition to the progress of writing
`mkwinpeimg' now correctly handles the '--start-script' option when the
start script is not in the working directory.
- Sequential extraction, previously required by using
+ Sequential extraction, previously requested by using
WIMLIB_EXTRACT_FLAG_SEQUENTIAL, is now the default.
- WIMLIB_EXTRACT_FLAG_FILE_ORDER can be used to get the old behavior
- (extract in file order).
+ WIMLIB_EXTRACT_FLAG_FILE_ORDER can be used to get the old default
+ behavior (extract in file order).
Version 1.5.3:
The new LZX compressor added in v1.5.2 has been improved and is now
faster LZX compressor is used; it will produce results in between those given
for XPRESS and LZX above.
-Note: if the absolute maximum (but still compatible; i.e. not changing the
+Note: if the absolute maximum but still compatible (i.e. not changing the
compression chunk size) LZX compression ratio is desired, `wimlib-imagex
optimize WIMFILE --recompress --compress-slow' on one of the above
LZX-compressed WIMs produces a WIM of 187,089,943 bytes in about 400 seconds.
this functionality is not available in Windows builds of wimlib and
\fB@IMAGEX_PROGNAME@\fR.)
.SH LOCALES AND CHARACTER ENCODINGS
-WIM files themselves store file and stream names using the UTF16-LE. On
-Windows, wimlib works in UTF-16LE, so conversions are usually necessary and
-there should be no problems with character encodings, except possibly in the XML
-data.
+WIM files themselves store file and stream names using UTF-16LE. On Windows,
+wimlib works in UTF-16LE, so conversions are usually not necessary and there
+should be no problems with character encodings.
.PP
On UNIX-like systems, wimlib works primarily in the locale-dependent multibyte
encoding, which you are strongly recommended to set to UTF-8 to avoid any
multiple files with the same case-insensitive name. Internally, wimlib
stores filenames as case-sensitive, but on Windows paths
actually provided by the user for use in a WIM image (e.g. for extracting,
-adding, renaming, or deleting files) will be treated as case-insensitive in
-order to get the "expected" behavior. This differs from the default behavior on
-UNIX-like systems, where such paths will be treated as case-sensitive. Note
-that with case insensitively, a path component may in general be ambiguous due
-to multiple files or directories having the same case-insensitive name. In such
-cases, if there is a file or directory with an exactly matching name, it is
-chosen; otherwise, one of the case-insensitively matching file or directories is
-chosen arbitrarily.
+adding, renaming, or deleting files) will by default be treated as
+case-insensitive in order to get the "expected" behavior. This differs from the
+default behavior on UNIX-like systems, where such paths will be treated as
+case-sensitive. Note that with case insensitivity, a path component may in
+general be ambiguous due to multiple files or directories having the same
+case-insensitive name. In such cases, if there is a file or directory with an
+exactly matching name, it is chosen; otherwise, one of the case-insensitively
+matching file or directories is chosen arbitrarily.
.PP
The default behavior can be overwritten by explicitly setting the environmental
variable \fBWIMLIB_IMAGEX_IGNORE_CASE\fR to 1, in which case such paths will be
treated case insensitively, or 0, in which such paths will be treated case
-sensitsively.
+sensitively.
.PP
Regardless of these settings, options and non-path arguments must be specified
in lower case.
/**
* Similar to wimlib_extract_paths(), but the paths to extract from the WIM
- * image specified in the UTF-8 text file named by @p path_list_file which
+ * image are specified in the UTF-8 text file named by @p path_list_file which
* itself contains the list of paths to use, one per line. Leading and trailing
* whitespace, and otherwise empty lines and lines beginning with the ';'
* character are ignored. No quotes are needed as paths are otherwise delimited
* ::WIMStruct for a WIM.
* @param out_chunk_size
* The chunk size (in bytes) to set. The valid chunk sizes are dependent
- * on the compression format. The XPRESS compression format supports chunk
- * sizes that are powers of 2 with exponents between 15 and 26 inclusively,
- * whereas the LZX compression format supports chunk sizes that are powers
- * of 2 with exponents between 15 and 21 inclusively. As a special case,
- * if @p out_chunk_size is specified as 0, the chunk size is set to the
- * default for the currently selected output compression type.
+ * on the compression format. The XPRESS and LZMS compression formats
+ * support chunk sizes that are powers of 2 with exponents between 15 and
+ * 26 inclusively, whereas the LZX compression format supports chunk sizes
+ * that are powers of 2 with exponents between 15 and 21 inclusively. As a
+ * special case, if @p out_chunk_size is specified as 0, the chunk size is
+ * set to the default for the currently selected output compression type.
*
* @return 0 on success; nonzero on error.
*
* @retval ::WIMLIB_ERR_INVALID_CHUNK_SIZE
- * @p ctype is not a supported chunk size.
+ * @p chunk_size is not a supported chunk size for the currently selected
+ * output compression type.
*/
extern int
wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size);
const tchar *wimfile;
const tchar *target;
const tchar *image_num_or_name = NULL;
- int extract_flags = WIMLIB_EXTRACT_FLAG_SEQUENTIAL;
+ int extract_flags = 0;
STRING_SET(refglobs);
const tchar *image_num_or_name;
const tchar *pathlist;
tchar *dest_dir = T(".");
- int extract_flags = WIMLIB_EXTRACT_FLAG_SEQUENTIAL | WIMLIB_EXTRACT_FLAG_NORPFIX;
+ int extract_flags = WIMLIB_EXTRACT_FLAG_NORPFIX;
int listfile_extract_flags = WIMLIB_EXTRACT_FLAG_GLOB_PATHS;
STRING_SET(refglobs);
if (ads_entry_has_name(&inode->i_ads_entries[i],
stream_name_utf16le,
stream_name_utf16le_nbytes,
- false))
+ default_ignore_case))
{
if (idx_ret)
*idx_ret = i;
/* Extract stream to temporary file. */
ret = create_temporary_file(&tmpfile_fd, &tmpfile_name);
- if (ret)
+ if (ret) {
+ lte_unbind_wim_resource_spec(needed_lte);
goto out_free_found_lte;
+ }
ret = extract_full_stream_to_fd(needed_lte,
&tmpfile_fd);
* block splitting is done; only compressing the full input into an aligned
* offset block is considered.
*
- * API
- * ===
- *
- * The old API (retained for backward compatibility) consists of just one
- * function:
- *
- * wimlib_lzx_compress()
- *
- * The new compressor has more potential parameters and needs more memory, so
- * the new API ties up memory allocations and compression parameters into a
- * context:
- *
- * wimlib_lzx_alloc_context()
- * wimlib_lzx_compress2()
- * wimlib_lzx_free_context()
- * wimlib_lzx_set_default_params()
- *
- * Both wimlib_lzx_compress() and wimlib_lzx_compress2() are designed to
- * compress an in-memory buffer of up to the window size, which can be any power
- * of two between 2^15 and 2^21 inclusively. However, by default, the WIM
- * format uses 2^15, and this is seemingly the only value that is compatible
- * with WIMGAPI. In any case, the window is not a true "sliding window" since
- * no data is ever "slid out" of the window. This is needed for the WIM format,
- * which is designed such that chunks may be randomly accessed.
- *
- * Both wimlib_lzx_compress() and wimlib_lzx_compress2() return 0 if the data
- * could not be compressed to less than the size of the uncompressed data.
- * Again, this is suitable for the WIM format, which stores such data chunks
- * uncompressed.
- *
- * The functions in this LZX compression API are exported from the library,
- * although with the possible exception of wimlib_lzx_set_default_params(), this
- * is only in case other programs happen to have uses for it other than WIM
- * reading/writing as already handled through the rest of the library.
- *
* Acknowledgments
* ===============
*
info->image_count = wim->hdr.image_count;
info->boot_index = wim->hdr.boot_idx;
info->wim_version = wim->hdr.wim_version;
- info->chunk_size = wim->hdr.chunk_size;
+ info->chunk_size = wim->chunk_size;
info->part_number = wim->hdr.part_number;
info->total_parts = wim->hdr.total_parts;
info->compression_type = wim->compression_type;
tchar *tstr = NULL;
int ret;
+ if (*tstr_ret)
+ return 0;
+
for_node_child(string_node, child) {
if (node_is_text(child) && child->content) {
ret = utf8_to_tstr_simple(child->content, &tstr);