The 'mkwinpeimg' script now supports writing the ISO image to standard
output.
+ On Windows, sparse file attributes are no longer set on extracted files.
+
The shared library version has been bumped up; however, there are only a
few incompatibilities:
.IP \[bu] 4
Encrypted files will not be extracted.
.IP \[bu]
-Although sparse file attributes will be applied, the full data will be extracted
-to each sparse file, so extracted "sparse" files may not actually contain any
-sparse regions.
+wimlib v1.6.3 and later: Sparse file attributes will not be extracted (same
+behavior as ImageX/DISM/WIMGAPI). wimlib v1.6.2 and earlier: Although sparse
+file attributes will be applied, the full data will be extracted to each sparse
+file, so extracted "sparse" files may not actually contain any sparse regions.
.PP
Regardless, since almost all information from the WIM image is restored in this
mode, it is possible to restore an image of an actual Windows installation using
ctx->supported_features.not_context_indexed_files = 1;
+#if 0
if (vol_flags & FILE_SUPPORTS_SPARSE_FILES)
ctx->supported_features.sparse_files = 1;
+#endif
if (vol_flags & FILE_NAMED_STREAMS)
ctx->supported_features.named_data_streams = 1;
if (h == INVALID_HANDLE_VALUE)
goto error;
+ /* Don't make extracted files sparse. It is pointless without also
+ * skipping over runs of zeroes when writing the file, and in fact
+ * increases disk usage --- apparently, allocation sizes in sparse files
+ * are rounded up to multiples of 131072 bytes rather than 4096 bytes.
+ * And in some Windows 7 images, *all* files are set as sparse for some
+ * reason, which causes 1 GB+ of disk space to be wasted on the target
+ * drive of a full extraction.
+ *
+ * WIMGAPI seemingly does not make extracted files sparse either.
+ *
+ * XXX: We really ought to do a proper sparse extraction anyway if the
+ * file meets some heuristic that indicates this would be beneficial.
+ */
+#if 0
if (attributes & FILE_ATTRIBUTE_SPARSE_FILE)
if (!DeviceIoControl(h, FSCTL_SET_SPARSE,
NULL, 0,
NULL, 0,
&bytes_returned, NULL))
goto error_close_handle;
+#endif
if (attributes & FILE_ATTRIBUTE_COMPRESSED)
if (!DeviceIoControl(h, FSCTL_SET_COMPRESSION,