prevnext   » WIT: Wiimms ISO Tools » wdf: Wiimms WDF Tool » wdf unpack

wdf unpack

Unpack WDF, WIA and CISO images. This is the default command, when the program name starts with the two letters 'un' in any case.


1.   Syntax

wdf +UNPACK [option]... files...

2.   Options

Option Param Description
-d --dest path Define a destination path (directory/file).
-D --DEST path Like --dest, but create the directory path automatically.
-o --overwrite Overwrite already existing files without warning.
--auto-split Enable auto split modus: Split only if necessary and determine the split size automatically.

THIS OPTION IS EXPERIMENTAL. In future versions it becomes the default.

--no-split Disable output file splitting. This is the default, but in future versions, the new option --auto-split becomes the default.
-z --split Enable output file splitting. The default split size is 4 GB.
-Z --split-size sz Enable output file splitting and define a split size. The parameter 'sz' is a floating point number followed by an optional unit factor (one of 'cb' [=1] or 'kmgtpe' [base=1000] or 'KMGTPE' [base=1024]). The default unit is 'G' (GiB).
--prealloc [=mode] This option enables or disables the disc space preallocation. If enabled the tools try to allocate disc space for the new files before writing the data. This reduces the fragmentation but also disables the sparse effect for preallocated areas.

The optional parameter decides the preallocation mode: OFF (or 0), SMART (or 1), ALL (or 2). If no parameter is set, ALL is used.

Mode 'OFF' disables the preallocation. Mode 'SMART' looks into the source disc to find out the writing areas. SMART is only available for ISO, CISO and WBFS file types. For other file types ALL is used instead. Mode 'ALL' (the default) preallocate the whole destination file. Because of the large holes in plain ISO images, the SMART mode is used for ISOs instead.

--chunk-mode mode Defines an operation mode for --chunk-size and --max-chunks. Allowed keywords are 'ANY' to allow any values, '32K' to force chunk sizes with a multiple of 32 KiB, 'POW2' to force chunk sizes >=32K and with a power of 2 or 'ISO' for ISO images (more restrictive as 'POW2', best for USB loaders). The case of the keyword is ignored. The default key is '32K'.

--chm is a shortcut for --chunk-mode.

--chunk-size sz Define the minimal chunk size if creating a CISO or WIA file (for WIA details see option --compression}). The default is to calculate the chunk size from the input file size and find a good value by using a minimal value of 1 MiB for »--chunk-mode ISO« and 32 KiB for modes 32K and POW2. For the modes ISO and POW2 the value is rounded up to the next power of 2. This calculation also depends from option --max-chunks.

The parameter 'sz' is a floating point number followed by an optional unit factor (one of 'cb' [=1] or 'kmgtpe' [base=1000] or 'KMGTPE' [base=1024]). The default unit is 'M' (MiB). If the number is prefixed with a '=' then options --chunk-mode and --max-chunks are ignored and the given value is used without any rounding or changing.

If the input file size is not known (e.g. reading from pipe), its size is assumed as 12 GiB.

--chs is a shortcut for --chunk-size.

--max-chunks n Define the maximal number of chunks if creating a CISO file. The default value is 8192 for »--chunk-mode ISO« and 32760 (maximal value) for all other modes. If this value is set than the automatic calculation of --chunk-size will be modified too.

--mch is a shortcut for --max-chunks.

--compression mode Select one compression method, level and chunk size for new WIA files. The syntax for mode is: [method] [.level] [@factor]

'method' is the name of the method. Possible compressions method are NONE, PURGE, BZIP2, LZMA and LZMA2. There are additional keywords: DEFAULT (=LZMA.5@20), FAST (=BZIP2.3@10), GOOD (=LZMA.5@20) BEST (=LZMA.7@50), and MEM (use best mode in respect to memory limit set by --mem). Additionally the single digit modes 0 (=NONE), 1 (=fast LZMA) .. 9 (=BEST)are defined. These additional keywords may change their meanings if a new compression method is implemented.

'.level' is a point followed by one digit. It defines the compression level. The special value .0 means: Use default compression level (=.5).

'@factor' is a factor for the chunk size. The base size is 2 MiB. The value @0 is replaced by the default factor @20 (40 MiB). If the factor is not set but option --chunk-size is set, the factor will be calculated by using a rounded value of that option.

All three parts are optional. All default values may be changed in the future. --compr is a shortcut for --compression and --wia=mode a shortcut for »--wia --compression mode«. The command »wit COMPR« prints an overview about all compression modes.

--mem size This option defines a memory usage limit for compressing files (in MiB if no other unit is entered). When compressing a file with method MEM (see --compression) the the compression method, level and chunk size are selected with respect to this limit.

If this option is not set or the value is 0, then the environment WIT_MEM is tried to read instead. If this fails, the tool tries to find out the total memory by reading /proc/meminfo. The limit is set to 80% of the total memory minus 50 MiB.

-c --stdout Write to standard output (stdout) and keep (don't delete) input files.

This is the default, when the program is reading from standard input (stdin).

-k --keep Keep (don't delete) input files during (un-)packing.
-p --preserve Preserve file times (atime+mtime) while copying an image. This option is enabled by default if an unmodified disc image is copied.