3 .\" Author: Lasse Collin
5 .\" This file has been put into the public domain.
6 .\" You can do whatever you want with this file.
8 .TH XZ 1 "2010-06-01" "Tukaani" "XZ Utils"
10 xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
18 .BR "xz \-\-decompress" .
22 .BR "xz \-\-decompress \-\-stdout" .
26 .BR "xz \-\-format=lzma" .
30 .BR "xz \-\-format=lzma \-\-decompress" .
34 .BR "xz \-\-format=lzma \-\-decompress \-\-stdout" .
36 When writing scripts that need to decompress files, it is recommended to
39 with appropriate arguments
49 is a general-purpose data compression tool with command line syntax similar to
53 The native file format is the
55 format, but also the legacy
57 format and raw compressed streams with no container format headers
61 compresses or decompresses each
63 according to the selected operation mode.
71 reads from standard input and writes the processed data to standard output.
73 will refuse (display an error and skip the
75 to write compressed data to standard output if it is a terminal. Similarly,
77 will refuse to read compressed data from standard input if it is a terminal.
85 are written to a new file whose name is derived from the source
89 When compressing, the suffix of the target file format
93 is appended to the source filename to get the target filename.
95 When decompressing, the
99 suffix is removed from the filename to get the target filename.
101 also recognizes the suffixes
105 and replaces them with the
109 If the target file already exists, an error is displayed and the
113 Unless writing to standard output,
115 will display a warning and skip the
117 if any of the following applies:
120 is not a regular file. Symbolic links are not followed, thus they
121 are not considered to be regular files.
124 has more than one hard link.
127 has setuid, setgid, or sticky bit set.
129 The operation mode is set to compress, and the
131 already has a suffix of the target file format
135 when compressing to the
141 when compressing to the
145 The operation mode is set to decompress, and the
147 doesn't have a suffix of any of the supported file formats
154 After successfully compressing or decompressing the
157 copies the owner, group, permissions, access time, and modification time
160 to the target file. If copying the group fails, the permissions are modified
161 so that the target file doesn't become accessible to users who didn't have
162 permission to access the source
165 doesn't support copying other metadata like access control lists
166 or extended attributes yet.
168 Once the target file has been successfully closed, the source
172 was specified. The source
174 is never removed if the output is written to standard output.
182 process makes it print progress information to standard error.
183 This has only limited use since when standard error is a terminal, using
185 will display an automatically updating progress indicator.
189 varies from a few hundred kilobytes to several gigabytes depending on
190 the compression settings. The settings used when compressing a file
191 affect also the memory usage of the decompressor. Typically the decompressor
192 needs only 5\ % to 20\ % of the amount of RAM that the compressor needed when
193 creating the file. Still, the worst-case memory usage of the decompressor
194 is several gigabytes.
196 To prevent uncomfortable surprises caused by huge memory usage,
198 has a built-in memory usage limiter. While some operating systems provide
199 ways to limit the memory usage of processes, relying on it wasn't deemed
200 to be flexible enough. The default limit depends on the total amount of
203 If 40\ % of RAM is at least 80 MiB, 40\ % of RAM is used as the limit.
205 If 80\ % of RAM is over 80 MiB, 80 MiB is used as the limit.
207 Otherwise 80\ % of RAM is used as the limit.
209 When compressing, if the selected compression settings exceed the memory
210 usage limit, the settings are automatically adjusted downwards and a notice
211 about this is displayed. As an exception, if the memory usage limit is
212 exceeded when compressing with
214 an error is displayed and
216 will exit with exit status
221 cannot be decompressed without exceeding the memory usage limit, an error
222 message is displayed and the file is skipped. Note that compressed files
223 may contain many blocks, which may have been compressed with different
224 settings. Typically all blocks will have roughly the same memory requirements,
225 but it is possible that a block later in the file will exceed the memory usage
226 limit, and an error about too low memory usage limit gets displayed after some
227 data has already been decompressed.
229 The absolute value of the active memory usage limit can be seen with
231 or near the bottom of the output of
233 The default limit can be overridden with
234 \fB\-\-memory=\fIlimit\fR.
235 .SS Concatenation and padding with .xz files
236 It is possible to concatenate
240 will decompress such files as if they were a single
244 It is possible to insert padding between the concenated parts
245 or after the last part. The padding must be null bytes and the size
246 of the padding must be a multiple of four bytes. This can be useful
247 if the .xz file is stored on a medium that stores file sizes
248 e.g. as 512-byte blocks.
250 Concatenation and padding are not allowed with
252 files or raw streams.
254 .SS "Integer suffixes and special values"
255 In most places where an integer argument is expected, an optional suffix
256 is supported to easily indicate large integers. There must be no space
257 between the integer and the suffix.
260 The integer is multiplied by 1,024 (2^10). Also
267 are accepted as synonyms for
271 The integer is multiplied by 1,048,576 (2^20). Also
277 are accepted as synonyms for
281 The integer is multiplied by 1,073,741,824 (2^30). Also
287 are accepted as synonyms for
292 can be used to indicate the maximum integer value supported by the option.
294 If multiple operation mode options are given, the last one takes effect.
296 .BR \-z ", " \-\-compress
297 Compress. This is the default operation mode when no operation mode option
298 is specified, and no other operation mode is implied from the command name
302 .BR \-\-decompress ).
304 .BR \-d ", " \-\-decompress ", " \-\-uncompress
307 .BR \-t ", " \-\-test
308 Test the integrity of compressed
310 No files are created or removed. This option is equivalent to
311 .B "\-\-decompress \-\-stdout"
312 except that the decompressed data is discarded instead of being
313 written to standard output.
315 .BR \-l ", " \-\-list
316 List information about compressed
318 No uncompressed output is produced, and no files are created or removed.
319 In list mode, the program cannot read the compressed data from standard
320 input or from other unseekable sources.
322 The default listing shows basic information about
324 one file per line. To get more detailed information, use also the
326 option. For even more information, use
328 twice, but note that it may be slow, because getting all the extra
329 information requires many seeks. The width of verbose output exceeds
330 80 characters, so piping the output to e.g.
332 may be convenient if the terminal isn't wide enough.
334 The exact output may vary between
336 versions and different locales. To get machine-readable output,
337 .B \-\-robot \-\-list
339 .SS "Operation modifiers"
341 .BR \-k ", " \-\-keep
342 Keep (don't delete) the input files.
344 .BR \-f ", " \-\-force
345 This option has several effects:
348 If the target file already exists, delete it before compressing or
351 Compress or decompress even if the input is a symbolic link to a regular file,
352 has more than one hard link, or has setuid, setgid, or sticky bit set.
353 The setuid, setgid, and sticky bits are not copied to the target file.
360 doesn't recognize the type of the source file,
362 will copy the source file as is to standard output. This allows using
367 for files that have not been compressed with
371 might support new compressed file formats, which may make
373 decompress more types of files instead of copying them as is to
375 .BI \-\-format= format
376 can be used to restrict
378 to decompress only a single file format.
381 .BR \-c ", " \-\-stdout ", " \-\-to-stdout
382 Write the compressed or decompressed data to standard output instead of
387 Disable creation of sparse files. By default, if decompressing into
390 tries to make the file sparse if the decompressed data contains long
391 sequences of binary zeros. It works also when writing to standard output
392 as long as standard output is connected to a regular file, and certain
393 additional conditions are met to make it safe. Creating sparse files may
394 save disk space and speed up the decompression by reducing the amount of
397 \fB\-S\fR \fI.suf\fR, \fB\-\-suffix=\fI.suf
398 When compressing, use
400 as the suffix for the target file instead of
404 If not writing to standard output and the source file already has the suffix
406 a warning is displayed and the file is skipped.
408 When decompressing, recognize also files with the suffix
410 in addition to files with the
416 suffix. If the source file has the suffix
418 the suffix is removed to get the target filename.
420 When compressing or decompressing raw streams
421 .RB ( \-\-format=raw ),
422 the suffix must always be specified unless writing to standard output,
423 because there is no default suffix for raw streams.
425 \fB\-\-files\fR[\fB=\fIfile\fR]
426 Read the filenames to process from
430 is omitted, filenames are read from standard input. Filenames must be
431 terminated with the newline character. A dash
433 is taken as a regular filename; it doesn't mean standard input.
434 If filenames are given also as command line arguments, they are
435 processed before the filenames read from
438 \fB\-\-files0\fR[\fB=\fIfile\fR]
439 This is identical to \fB\-\-files\fR[\fB=\fIfile\fR] except that the
440 filenames must be terminated with the null character.
441 .SS "Basic file format and compression options"
443 \fB\-F\fR \fIformat\fR, \fB\-\-format=\fIformat
444 Specify the file format to compress or decompress:
448 This is the default. When compressing,
452 When decompressing, the format of the input file is automatically detected.
453 Note that raw streams (created with
455 cannot be auto-detected.
460 file format, or accept only
462 files when decompressing.
467 Compress to the legacy
469 file format, or accept only
471 files when decompressing. The alternative name
473 is provided for backwards compatibility with LZMA Utils.
476 Compress or uncompress a raw stream (no headers). This is meant for advanced
477 users only. To decode raw streams, you need to set not only
479 but also specify the filter chain, which would normally be stored in the
480 container format headers.
483 \fB\-C\fR \fIcheck\fR, \fB\-\-check=\fIcheck
484 Specify the type of the integrity check, which is calculated from the
485 uncompressed data. This option has an effect only when compressing into the
489 format doesn't support integrity checks.
490 The integrity check (if any) is verified when the
492 file is decompressed.
500 Don't calculate an integrity check at all. This is usually a bad idea. This
501 can be useful when integrity of the data is verified by other means anyway.
504 Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet).
507 Calculate CRC64 using the polynomial from ECMA-182. This is the default, since
508 it is slightly better than CRC32 at detecting damaged files and the speed
509 difference is negligible.
512 Calculate SHA-256. This is somewhat slower than CRC32 and CRC64.
517 headers is always verified with CRC32. It is not possible to change or
521 Select compression preset. If a preset level is specified multiple times,
522 the last one takes effect.
524 The compression preset levels can be categorised roughly into three
527 .IP "\fB\-0\fR ... \fB\-2"
528 Fast presets with relatively low memory usage.
532 should give compression speed and ratios comparable to
539 is not very good (not much faster than
541 but much worse compression). In future,
543 may be indicate some fast algorithm instead of LZMA2.
544 .IP "\fB\-3\fR ... \fB\-5"
545 Good compression ratio with low to medium memory usage.
546 These are significantly slower than levels 0\-2.
547 .IP "\fB\-6\fR ... \fB\-9"
548 Excellent compression with medium to high memory usage. These are also
549 slower than the lower preset levels. The default is
551 Unless you want to maximize the compression ratio, you probably don't want
552 a higher preset level than
554 due to speed and memory usage.
557 The exact compression settings (filter chain) used by each preset may
560 versions. The settings may also vary between files being compressed, if
562 determines that modified settings will probably give better compression
563 ratio without significantly affecting compression time or memory usage.
565 Because the settings may vary, the memory usage may vary too. The following
566 table lists the maximum memory usage of each preset level, which won't be
567 exceeded even in future versions of
570 .B "FIXME: The table below is just a rough idea."
577 Preset;Compression;Decompression
594 automatically adjusts the compression settings downwards if
595 the memory usage limit would be exceeded, so it is safe to specify
596 a high preset level even on systems that don't have lots of RAM.
598 .BR \-\-fast " and " \-\-best
599 These are somewhat misleading aliases for
604 These are provided only for backwards compatibility with LZMA Utils.
605 Avoid using these options.
607 Especially the name of
609 is misleading, because the definition of best depends on the input data,
610 and that usually people don't want the very best compression ratio anyway,
611 because it would be very slow.
613 .BR \-e ", " \-\-extreme
614 Modify the compression preset (\fB\-0\fR ... \fB\-9\fR) so that a little bit
615 better compression ratio can be achieved without increasing memory usage
616 of the compressor or decompressor (exception: compressor memory usage may
617 increase a little with presets \fB\-0\fR ... \fB\-2\fR). The downside is that
618 the compression time will increase dramatically (it can easily double).
620 \fB\-M\fR \fIlimit\fR, \fB\-\-memory=\fIlimit
621 Set the memory usage limit. If this option is specified multiple times,
622 the last one takes effect. The
624 can be specified in multiple ways:
629 can be an absolute value in bytes. Using an integer suffix like
631 can be useful. Example:
632 .B "\-\-memory=80MiB"
636 can be specified as a percentage of physical RAM. Example:
641 can be reset back to its default value by setting it to
645 for how the default limit is defined.
647 The memory usage limiting can be effectively disabled by setting
651 This isn't recommended. It's usually better to use, for example,
657 can be seen near the bottom of the output of the
661 \fB\-T\fR \fIthreads\fR, \fB\-\-threads=\fIthreads
662 Specify the maximum number of worker threads to use. The default is
663 the number of available CPU cores. You can see the current value of
665 near the end of the output of the
669 The actual number of worker threads can be less than
671 if using more threads would exceed the memory usage limit.
672 In addition to CPU-intensive worker threads,
674 may use a few auxiliary threads, which don't use a lot of CPU time.
676 .B "Multithreaded compression and decompression are not implemented yet,"
677 .B "so this option has no effect for now."
678 .SS Custom compressor filter chains
679 A custom filter chain allows specifying the compression settings in detail
680 instead of relying on the settings associated to the preset levels.
681 When a custom filter chain is specified, the compression preset level options
682 (\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR) are silently ignored.
684 A filter chain is comparable to piping on the UN*X command line.
685 When compressing, the uncompressed input goes to the first filter, whose
686 output goes to the next filter (if any). The output of the last filter
687 gets written to the compressed file. The maximum number of filters in
688 the chain is four, but typically a filter chain has only one or two filters.
690 Many filters have limitations where they can be in the filter chain:
691 some filters can work only as the last filter in the chain, some only
692 as a non-last filter, and some work in any position in the chain. Depending
693 on the filter, this limitation is either inherent to the filter design or
694 exists to prevent security issues.
696 A custom filter chain is specified by using one or more filter options in
697 the order they are wanted in the filter chain. That is, the order of filter
698 options is significant! When decoding raw streams
699 .RB ( \-\-format=raw ),
700 the filter chain is specified in the same order as it was specified when
703 Filters take filter-specific
705 as a comma-separated list. Extra commas in
707 are ignored. Every option has a default value, so you need to
708 specify only those you want to change.
710 \fB\-\-lzma1\fR[\fB=\fIoptions\fR], \fB\-\-lzma2\fR[\fB=\fIoptions\fR]
711 Add LZMA1 or LZMA2 filter to the filter chain. These filter can be used
712 only as the last filter in the chain.
714 LZMA1 is a legacy filter, which is supported almost solely due to the legacy
716 file format, which supports only LZMA1. LZMA2 is an updated
717 version of LZMA1 to fix some practical issues of LZMA1. The
719 format uses LZMA2, and doesn't support LZMA1 at all. Compression speed and
720 ratios of LZMA1 and LZMA2 are practically the same.
722 LZMA1 and LZMA2 share the same set of
727 Reset all LZMA1 or LZMA2
732 consist of an integer, which may be followed by single-letter preset
733 modifiers. The integer can be from
737 matching the command line options \fB\-0\fR ... \fB\-9\fR.
738 The only supported modifier is currently
747 from which the default values for the rest of the LZMA1 or LZMA2
752 Dictionary (history buffer) size indicates how many bytes of the recently
753 processed uncompressed data is kept in memory. One method to reduce size of
754 the uncompressed data is to store distance-length pairs, which
755 indicate what data to repeat from the dictionary buffer. The bigger
756 the dictionary, the better the compression ratio usually is,
757 but dictionaries bigger than the uncompressed data are waste of RAM.
759 Typical dictionary size is from 64 KiB to 64 MiB. The minimum is 4 KiB.
760 The maximum for compression is currently 1.5 GiB. The decompressor already
761 supports dictionaries up to one byte less than 4 GiB, which is the
762 maximum for LZMA1 and LZMA2 stream formats.
764 Dictionary size has the biggest effect on compression ratio.
765 Dictionary size and match finder together determine the memory usage of
766 the LZMA1 or LZMA2 encoder. The same dictionary size is required
767 for decompressing that was used when compressing, thus the memory usage of
768 the decoder is determined by the dictionary size used when compressing.
771 Specify the number of literal context bits. The minimum is
777 In addition, the sum of
785 Specify the number of literal position bits. The minimum is
793 Specify the number of position bits. The minimum is
803 specifies the function used to analyze the data produced by the match finder.
822 Match finder has a major effect on encoder speed, memory usage, and
823 compression ratio. Usually Hash Chain match finders are faster than
824 Binary Tree match finders. Hash Chains are usually used together with
826 and Binary Trees with
828 The memory usage formulas are only rough estimates,
829 which are closest to reality when
835 Hash Chain with 2- and 3-byte hashing
853 Hash Chain with 2-, 3-, and 4-byte hashing
864 Binary Tree with 2-byte hashing
875 Binary Tree with 2- and 3-byte hashing
893 Binary Tree with 2-, 3-, and 4-byte hashing
905 Specify what is considered to be a nice length for a match. Once a match
908 bytes is found, the algorithm stops looking for possibly better matches.
911 can be 2\-273 bytes. Higher values tend to give better compression ratio
912 at expense of speed. The default depends on the
917 Specify the maximum search depth in the match finder. The default is the
920 which makes the compressor determine a reasonable
927 Using very high values for
929 can make the encoder extremely slow with carefully crafted files.
932 over 1000 unless you are prepared to interrupt the compression in case it
936 When decoding raw streams
937 .RB ( \-\-format=raw ),
938 LZMA2 needs only the value of
946 \fB\-\-x86\fR[\fB=\fIoptions\fR]
948 \fB\-\-powerpc\fR[\fB=\fIoptions\fR]
950 \fB\-\-ia64\fR[\fB=\fIoptions\fR]
952 \fB\-\-arm\fR[\fB=\fIoptions\fR]
954 \fB\-\-armthumb\fR[\fB=\fIoptions\fR]
956 \fB\-\-sparc\fR[\fB=\fIoptions\fR]
957 Add a branch/call/jump (BCJ) filter to the filter chain. These filters
958 can be used only as non-last filter in the filter chain.
960 A BCJ filter converts relative addresses in the machine code to their
961 absolute counterparts. This doesn't change the size of the data, but
962 it increases redundancy, which allows e.g. LZMA2 to get better
965 The BCJ filters are always reversible, so using a BCJ filter for wrong
966 type of data doesn't cause any data loss. However, applying a BCJ filter
967 for wrong type of data is a bad idea, because it tends to make the
968 compression ratio worse.
970 Different instruction sets have have different alignment:
977 Filter;Alignment;Notes
978 x86;1;32-bit and 64-bit x86
979 PowerPC;4;Big endian only
980 ARM;4;Little endian only
981 ARM-Thumb;2;Little endian only
982 IA-64;16;Big or little endian
983 SPARC;4;Big or little endian
988 Since the BCJ-filtered data is usually compressed with LZMA2, the compression
989 ratio may be improved slightly if the LZMA2 options are set to match the
990 alignment of the selected BCJ filter. For example, with the IA-64 filter,
993 with LZMA2 (2^4=16). The x86 filter is an exception; it's usually good to
994 stick to LZMA2's default four-byte alignment when compressing x86 executables.
996 All BCJ filters support the same
1003 that is used when converting between relative and absolute addresses.
1006 must be a multiple of the alignment of the filter (see the table above).
1007 The default is zero. In practice, the default is good; specifying
1010 is almost never useful.
1012 Specifying a non-zero start
1014 is probably useful only if the executable has multiple sections, and there
1015 are many cross-section jumps or calls. Applying a BCJ filter separately for
1016 each section with proper start offset and then compressing the result as
1017 a single chunk may give some improvement in compression ratio compared
1018 to applying the BCJ filter with the default
1020 for the whole executable.
1023 \fB\-\-delta\fR[\fB=\fIoptions\fR]
1024 Add Delta filter to the filter chain. The Delta filter
1025 can be used only as non-last filter in the filter chain.
1027 Currently only simple byte-wise delta calculation is supported. It can
1028 be useful when compressing e.g. uncompressed bitmap images or uncompressed
1029 PCM audio. However, special purpose algorithms may give significantly better
1030 results than Delta + LZMA2. This is true especially with audio, which
1031 compresses faster and better e.g. with FLAC.
1040 of the delta calculation as bytes.
1042 must be 1\-256. The default is 1.
1046 and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be
1047 A1 B1 01 02 01 02 01 02.
1051 .BR \-q ", " \-\-quiet
1052 Suppress warnings and notices. Specify this twice to suppress errors too.
1053 This option has no effect on the exit status. That is, even if a warning
1054 was suppressed, the exit status to indicate a warning is still used.
1056 .BR \-v ", " \-\-verbose
1057 Be verbose. If standard error is connected to a terminal,
1059 will display a progress indicator.
1062 twice will give even more verbose output (useful mostly for debugging).
1064 The progress indicator shows the following information:
1067 Completion percentage is shown if the size of the input file is known.
1068 That is, percentage cannot be shown in pipes.
1070 Amount of compressed data produced (compressing) or consumed (decompressing).
1072 Amount of uncompressed data consumed (compressing) or produced
1075 Compression ratio, which is calculated by dividing the amount of
1076 compressed data processed so far by the amount of uncompressed data
1079 Compression or decompression speed. This is measured as the amount of
1080 uncompressed data consumed (compression) or produced (decompression)
1081 per second. It is shown once a few seconds have passed since
1083 started processing the file.
1085 Elapsed time or estimated time remaining.
1086 Elapsed time is displayed in the format M:SS or H:MM:SS.
1087 The estimated remaining time is displayed in a less precise format
1088 which never has colons, for example, 2 min 30 s. The estimate can
1089 be shown only when the size of the input file is known and a couple of
1090 seconds have already passed since
1092 started processing the file.
1095 When standard error is not a terminal,
1099 print the filename, compressed size, uncompressed size, compression ratio,
1100 speed, and elapsed time on a single line to standard error after
1101 compressing or decompressing the file. If operating took at least a few
1102 seconds, also the speed and elapsed time are printed. If the operation
1103 didn't finish, for example due to user interruption, also the completion
1104 percentage is printed if the size of the input file is known.
1106 .BR \-Q ", " \-\-no\-warn
1107 Don't set the exit status to
1109 even if a condition worth a warning was detected. This option doesn't affect
1110 the verbosity level, thus both
1114 have to be used to not display warnings and to not alter the exit status.
1117 Print messages in a machine-parsable format. This is intended to ease
1118 writing frontends that want to use
1120 instead of liblzma, which may be the case with various scripts. The output
1121 with this option enabled is meant to be stable across
1123 releases. See the section
1128 Display the current memory usage limit in human-readable format on
1129 a single line, and exit successfully. To see how much RAM
1131 thinks your system has, use
1132 .BR "\-\-memory=100% \-\-info\-memory" .
1134 .BR \-h ", " \-\-help
1135 Display a help message describing the most commonly used options,
1136 and exit successfully.
1138 .BR \-H ", " \-\-long\-help
1139 Display a help message describing all features of
1141 and exit successfully
1143 .BR \-V ", " \-\-version
1144 Display the version number of
1146 and liblzma in human readable format. To get machine-parsable output, specify
1151 The robot mode is activated with the
1153 option. It makes the output of
1155 easier to parse by other programs. Currently
1157 is supported only together with
1159 .BR \-\-info-memory ,
1162 It will be supported for normal compression and decompression in the future.
1165 .B "xz \-\-robot \-\-version"
1166 will print the version number of
1168 and liblzma in the following format:
1170 .BI XZ_VERSION= XYYYZZZS
1172 .BI LIBLZMA_VERSION= XYYYZZZS
1178 Minor version. Even numbers are stable.
1179 Odd numbers are alpha or beta versions.
1182 Patch level for stable releases or just a counter for development releases.
1200 are the same on both lines if
1202 and liblzma are from the same XZ Utils release.
1204 Examples: 4.999.9beta is
1209 .SS Memory limit information
1210 .B "xz \-\-robot \-\-info-memory"
1211 prints the current memory usage limit as bytes on a single line.
1212 To get the total amount of installed RAM, use
1213 .BR "xz \-\-robot \-\-memory=100% \-\-info-memory" .
1215 .B "xz \-\-robot \-\-list"
1216 uses tab-separated output. The first column of every line has a string
1217 that indicates the type of the information found on that line:
1220 This is always the first line when starting to list a file. The second
1221 column on the line is the filename.
1224 This line contains overall information about the
1226 file. This line is always printed after the
1231 This line type is used only when
1233 was specified. There are as many
1235 lines as there are streams in the
1240 This line type is used only when
1242 was specified. There are as many
1244 lines as there are blocks in the
1248 lines are shown after all the
1250 lines; different line types are not interleaved.
1253 This line type is used only when
1255 was specified twice. This line is printed after all
1261 line contains overall information about the
1266 This line is always the very last line of the list output. It shows
1267 the total counts and sizes.
1274 Number of streams in the file
1276 Total number of blocks in the stream(s)
1278 Compressed size of the file
1280 Uncompressed size of the file
1282 Compression ratio, for example
1284 If ratio is over 9.999, three dashes
1286 are displayed instead of the ratio.
1288 Comma-separated list of integrity check names. The following strings are
1289 used for the known check types:
1295 For unknown check types,
1299 is the Check ID as a decimal number (one or two digits).
1301 Total size of stream padding in the file
1309 Stream number (the first stream is 1)
1311 Number of blocks in the stream
1313 Compressed start offset
1315 Uncompressed start offset
1317 Compressed size (does not include stream padding)
1323 Name of the integrity check
1325 Size of stream padding
1333 Number of the stream containing this block
1335 Block number relative to the beginning of the stream (the first block is 1)
1337 Block number relative to the beginning of the file
1339 Compressed start offset relative to the beginning of the file
1341 Uncompressed start offset relative to the beginning of the file
1343 Total compressed size of the block (includes headers)
1349 Name of the integrity check
1354 was specified twice, additional columns are included on the
1356 lines. These are not displayed with a single
1358 because getting this information requires many seeks and can thus be slow:
1361 Value of the integrity check in hexadecimal
1367 indicates that compressed size is present, and
1369 indicates that uncompressed size is present.
1370 If the flag is not set, a dash
1372 is shown instead to keep the string length fixed. New flags may be added
1373 to the end of the string in the future.
1375 Size of the actual compressed data in the block (this excludes
1376 the block header, block padding, and check fields)
1378 Amount of memory (as bytes) required to decompress this block with this
1382 Filter chain. Note that most of the options used at compression time cannot
1383 be known, because only the options that are needed for decompression are
1402 Average compression ratio
1404 Comma-separated list of integrity check names that were present in the files
1408 Number of files. This is here to keep the order of the earlier columns
1416 was specified twice, additional columns are included on the
1421 Maximum amount of memory (as bytes) required to decompress the files
1429 indicating if all block headers have both compressed size and
1430 uncompressed size stored in them
1433 Future versions may add new line types and new columns can be added to
1434 the existing line types, but the existing columns won't be changed.
1444 Something worth a warning occurred, but no actual errors occurred.
1446 Notices (not warnings or errors) printed on standard error don't affect
1451 A space-separated list of options is parsed from
1453 before parsing the options given on the command line. Note that only
1454 options are parsed from
1456 all non-options are silently ignored. Parsing is done with
1458 which is used also for the command line arguments.
1459 .SH "LZMA UTILS COMPATIBILITY"
1460 The command line syntax of
1462 is practically a superset of
1467 as found from LZMA Utils 4.32.x. In most cases, it is possible to replace
1468 LZMA Utils with XZ Utils without breaking existing scripts. There are some
1469 incompatibilities though, which may sometimes cause problems.
1470 .SS "Compression preset levels"
1471 The numbering of the compression level presets is not identical in
1474 The most important difference is how dictionary sizes are mapped to different
1475 presets. Dictionary size is roughly equal to the decompressor memory usage.
1494 The dictionary size differences affect the compressor memory usage too,
1495 but there are some other differences between LZMA Utils and XZ Utils, which
1496 make the difference even bigger:
1502 Level;xz;LZMA Utils 4.32.x
1515 The default preset level in LZMA Utils is
1517 while in XZ Utils it is
1519 so both use 8 MiB dictionary by default.
1520 .SS "Streamed vs. non-streamed .lzma files"
1521 Uncompressed size of the file can be stored in the
1523 header. LZMA Utils does that when compressing regular files.
1524 The alternative is to mark that uncompressed size is unknown and
1525 use end of payload marker to indicate where the decompressor should stop.
1526 LZMA Utils uses this method when uncompressed size isn't known, which is
1527 the case for example in pipes.
1530 supports decompressing
1532 files with or without end of payload marker, but all
1536 will use end of payload marker and have uncompressed size marked as unknown
1539 header. This may be a problem in some (uncommon) situations. For example, a
1541 decompressor in an embedded device might work only with files that have known
1542 uncompressed size. If you hit this problem, you need to use LZMA Utils or
1545 files with known uncompressed size.
1546 .SS "Unsupported .lzma files"
1553 values up to 4. LZMA Utils can decompress files with any
1557 but always creates files with
1561 Creating files with other
1569 The implementation of the LZMA1 filter in liblzma requires
1574 must not exceed 4. Thus,
1576 files which exceed this limitation, cannot be decompressed with
1579 LZMA Utils creates only
1581 files which have dictionary size of
1583 (a power of 2), but accepts files with any dictionary size.
1584 liblzma accepts only
1586 files which have dictionary size of
1589 .RI "2^" n " + 2^(" n "\-1)."
1590 This is to decrease false positives when detecting
1594 These limitations shouldn't be a problem in practice, since practically all
1596 files have been compressed with settings that liblzma will accept.
1597 .SS "Trailing garbage"
1598 When decompressing, LZMA Utils silently ignore everything after the first
1600 stream. In most situations, this is a bug. This also means that LZMA Utils
1601 don't support decompressing concatenated
1605 If there is data left after the first
1609 considers the file to be corrupt. This may break obscure scripts which have
1610 assumed that trailing garbage is ignored.
1612 .SS Compressed output may vary
1613 The exact compressed output produced from the same uncompressed input file
1614 may vary between XZ Utils versions even if compression options are identical.
1615 This is because the encoder can be improved (faster or better compression)
1616 without affecting the file format. The output can vary even between different
1617 builds of the same XZ Utils version, if different build options are used.
1619 The above means that implementing
1623 files is not going to happen without freezing a part of the encoder
1624 implementation, which can then be used with
1626 .SS Embedded .xz decompressors
1629 decompressor implementations like XZ Embedded don't necessarily support files
1636 Since the default is \fB\-\-check=\fIcrc64\fR, you must use
1640 when creating files for embedded systems.
1642 Outside embedded systems, all
1644 format decompressors support all the
1646 types, or at least are able to decompress the file without verifying the
1647 integrity check if the particular
1651 XZ Embedded supports BCJ filters, but only with the default start offset.
1654 A mix of compressed and uncompressed files can be decompressed
1655 to standard output with a single command:
1657 .B "xz -dcf a.txt b.txt.xz c.txt d.txt.xz > abcd.txt"
1658 .SS Parallel compression of many files
1663 can be used to parallellize compression of many files:
1666 .B "find . \-type f \e! \-name '*.xz' \-print0 | xargs \-0r \-P4 \-n16 xz"
1670 option sets the number of parallel
1672 processes. The best value for the
1674 option depends on how many files there are to be compressed.
1675 If there are only a couple of files, the value should probably be
1677 with tens of thousands of files,
1679 or even more may be appropriate to reduce the number of
1683 will eventually create.
1684 .SS Robot mode examples
1685 Calculating how many bytes have been saved in total after compressing
1688 .B "xz --robot --list *.xz | awk '/^totals/{print $5\-$4}'"
1694 XZ Utils: <http://tukaani.org/xz/>
1696 XZ Embedded: <http://tukaani.org/xz/embedded.html>
1698 LZMA SDK: <http://7-zip.org/sdk.html>