IMAGEX_NORPFIX_OPTION,
IMAGEX_NOCHECK_OPTION,
IMAGEX_NO_ACLS_OPTION,
+ IMAGEX_NO_PACK_STREAMS_OPTION,
IMAGEX_NOT_PIPABLE_OPTION,
+ IMAGEX_PACK_STREAMS_OPTION,
IMAGEX_PATH_OPTION,
IMAGEX_PIPABLE_OPTION,
IMAGEX_REBUILD_OPTION,
{T("compress"), required_argument, NULL, IMAGEX_COMPRESS_OPTION},
{T("compress-slow"), no_argument, NULL, IMAGEX_COMPRESS_SLOW_OPTION},
{T("chunk-size"), required_argument, NULL, IMAGEX_CHUNK_SIZE_OPTION},
+ {T("pack-streams"), no_argument, NULL, IMAGEX_PACK_STREAMS_OPTION},
{T("config"), required_argument, NULL, IMAGEX_CONFIG_OPTION},
{T("dereference"), no_argument, NULL, IMAGEX_DEREFERENCE_OPTION},
{T("flags"), required_argument, NULL, IMAGEX_FLAGS_OPTION},
#define TO_PERCENT(numerator, denominator) \
(((denominator) == 0) ? 0 : ((numerator) * 100 / (denominator)))
-/* Given an enumerated value for WIM compression type, return a descriptive
- * string. */
-static const tchar *
-get_data_type(int ctype)
-{
- switch (ctype) {
- case WIMLIB_COMPRESSION_TYPE_NONE:
- return T("uncompressed");
- case WIMLIB_COMPRESSION_TYPE_LZX:
- return T("LZX-compressed");
- case WIMLIB_COMPRESSION_TYPE_XPRESS:
- return T("XPRESS-compressed");
- }
- return NULL;
-}
-
#define GIBIBYTE_MIN_NBYTES 10000000000ULL
#define MEBIBYTE_MIN_NBYTES 10000000ULL
#define KIBIBYTE_MIN_NBYTES 10000ULL
info->write_streams.total_bytes);
if (info->write_streams.completed_streams == 0) {
- const tchar *data_type;
-
- data_type = get_data_type(info->write_streams.compression_type);
- imagex_printf(T("Writing %"TS" data using %u thread%"TS"\n"),
- data_type, info->write_streams.num_threads,
+ imagex_printf(T("Writing %"TS"-compressed data using %u thread%"TS"\n"),
+ wimlib_get_compression_type_string(info->write_streams.compression_type),
+ info->write_streams.num_threads,
(info->write_streams.num_threads == 1) ? T("") : T("s"));
}
if (info->write_streams.total_parts <= 1) {
}
}
-static uint32_t parse_chunk_size(const char *optarg)
+static uint32_t parse_chunk_size(const tchar *optarg)
{
- char *tmp;
- unsigned long chunk_size = strtoul(optarg, &tmp, 10);
+ tchar *tmp;
+ unsigned long chunk_size = tstrtoul(optarg, &tmp, 10);
if (chunk_size >= UINT32_MAX || *tmp || tmp == optarg) {
imagex_error(T("Chunk size must be a non-negative integer!"));
return UINT32_MAX;
if (chunk_size == UINT32_MAX)
goto out_err;
break;
+ case IMAGEX_PACK_STREAMS_OPTION:
+ write_flags |= WIMLIB_WRITE_FLAG_PACK_STREAMS;
+ break;
case IMAGEX_FLAGS_OPTION:
flags_element = optarg;
break;
tprintf(T("GUID: 0x"));
print_byte_field(info->guid, sizeof(info->guid));
tputchar(T('\n'));
+ tprintf(T("Version: %u\n"), info->wim_version);
tprintf(T("Image Count: %d\n"), info->image_count);
tprintf(T("Compression: %"TS"\n"),
wimlib_get_compression_type_string(info->compression_type));
print_resource(const struct wimlib_resource_entry *resource,
void *_ignore)
{
-
- tprintf(T("Uncompressed size = %"PRIu64" bytes\n"),
+ tprintf(T("Uncompressed size = %"PRIu64" bytes\n"),
resource->uncompressed_size);
+ if (resource->is_packed_streams) {
+ tprintf(T("Raw uncompressed size = %"PRIu64" bytes\n"),
+ resource->raw_resource_uncompressed_size);
+
+ tprintf(T("Raw compressed size = %"PRIu64" bytes\n"),
+ resource->raw_resource_compressed_size);
- tprintf(T("Compressed size = %"PRIu64" bytes\n"),
- resource->compressed_size);
+ tprintf(T("Raw offset in WIM = %"PRIu64" bytes\n"),
+ resource->raw_resource_offset_in_wim);
- tprintf(T("Offset = %"PRIu64" bytes\n"),
- resource->offset);
+ tprintf(T("Offset in raw = %"PRIu64" bytes\n"),
+ resource->offset);
+ } else {
+ tprintf(T("Compressed size = %"PRIu64" bytes\n"),
+ resource->compressed_size);
+
+ tprintf(T("Offset in WIM = %"PRIu64" bytes\n"),
+ resource->offset);
+ }
- tprintf(T("Part Number = %u\n"), resource->part_number);
- tprintf(T("Reference Count = %u\n"), resource->reference_count);
+ tprintf(T("Part Number = %u\n"), resource->part_number);
+ tprintf(T("Reference Count = %u\n"), resource->reference_count);
- tprintf(T("Hash = 0x"));
+ tprintf(T("Hash = 0x"));
print_byte_field(resource->sha1_hash, sizeof(resource->sha1_hash));
tputchar(T('\n'));
- tprintf(T("Flags = "));
+ tprintf(T("Flags = "));
if (resource->is_compressed)
tprintf(T("WIM_RESHDR_FLAG_COMPRESSED "));
if (resource->is_metadata)
tprintf(T("WIM_RESHDR_FLAG_FREE "));
if (resource->is_spanned)
tprintf(T("WIM_RESHDR_FLAG_SPANNED "));
+ if (resource->is_packed_streams)
+ tprintf(T("WIM_RESHDR_FLAG_PACKED_STREAMS "));
tputchar(T('\n'));
tputchar(T('\n'));
return 0;