{
    "content": [
        {
            "type": "text",
            "text": "# xz(1) (man)\n\n**Summary:** xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files\n\n**Synopsis:** xz [option...]  [file...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -z | --compress | — | Compress. This is the default operation mode when no operation mode option is speci‐ fied and no other operation mode is |\n| -d | --uncompress | — | Decompress. |\n| -t | --test | — | Test the integrity of compressed files. This option is equivalent to --decompress --stdout except that the decompressed  |\n| -l | --list | — | Print information about compressed files. No uncompressed output is produced, and no files are created or removed. In li |\n| -k | --keep | — | Don't delete the input files. Since xz 5.4.0, this option also makes xz compress or decompress even if the input is a sy |\n| -f | --force | — | This option has several effects: • If the target file already exists, delete it before compressing or decompressing. • C |\n| -c | --to-stdout | — | Write the compressed or decompressed data to standard output instead of a file. This implies --keep. |\n| — | --single-stream | — | Decompress only the first .xz stream, and silently ignore possible remaining input data following the stream. Normally s |\n| — | --no-sparse | — | Disable creation of sparse files. By default, if decompressing into a regular file, xz tries to make the file sparse if  |\n| -S | — | — | When compressing, use .suf as the suffix for the target file instead of .xz or .lzma. If not writing to standard output  |\n| -F | — | — | Specify the file format to compress or decompress: auto This is the default. When compressing, auto is equivalent to xz. |\n| -C | — | — | Specify the type of the integrity check. The check is calculated from the uncom‐ pressed data and stored in the .xz file |\n| — | --ignore-check | — | Don't verify the integrity check of the compressed data when decompressing. The CRC32 values in the .xz headers will sti |\n| -9 | — | — | Select a compression preset level. The default is -6. If multiple preset levels are specified, the last one takes effect |\n| -e | --extreme | — | Use a slower variant of the selected compression preset level (-0 ... -9) to hopefully get a little bit better compressi |\n| — | --fast | — | --best These are somewhat misleading aliases for -0 and -9, respectively. These are provided only for backwards compatib |\n| -M | — | — | This is equivalent to specifying --memlimit-compress=limit --memlimit-decom‐‐ press=limit. |\n| — | --no-adjust | — | Display an error and exit if the compression settings exceed the memory usage limit. The default is to adjust the settin |\n| -T | — | — | Specify the number of worker threads to use. Setting threads to a special value 0 makes xz use as many threads as there  |\n| -q | --quiet | — | Suppress warnings and notices. Specify this twice to suppress errors too. This op‐ tion has no effect on the exit status |\n| -v | --verbose | — | Be verbose. If standard error is connected to a terminal, xz will display a progress indicator. Specifying --verbose twi |\n| -Q | --no-warn | — | Don't set the exit status to 2 even if a condition worth a warning was detected. This option doesn't affect the verbosit |\n| — | --robot | — | Print messages in a machine-parsable format. This is intended to ease writing front‐ ends that want to use xz instead of |\n| — | --info-memory | — | Display, in human-readable format, how much physical memory (RAM) xz thinks the system has and the memory usage limits f |\n| -h | --help | — | Display a help message describing the most commonly used options, and exit success‐ fully. |\n| -H | --long-help | — | Display a help message describing all features of xz, and exit successfully |\n| -V | --version | — | Display the version number of xz and liblzma in human readable format. To get ma‐ chine-parsable output, specify --robot |\n\n## Examples\n\n- `Compress the file foo into foo.xz using the default compression level (-6), and remove foo if`\n- `compression is successful:`\n- `xz foo`\n- `Decompress bar.xz into bar and don't remove bar.xz even if decompression is successful:`\n- `xz -dk bar.xz`\n- `Create  baz.tar.xz  with  the preset -4e (-4 --extreme), which is slower than the default -6,`\n- `but needs less memory for compression and decompression (48 MiB and 5 MiB, respectively):`\n- `tar cf - baz | xz -4e > baz.tar.xz`\n- `A mix of compressed and uncompressed files can be decompressed to standard output with a sin‐`\n- `gle command:`\n- `xz -dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt`\n- `On GNU and *BSD, find(1) and xargs(1) can be used to parallelize compression of many files:`\n- `find . -type f \\! -name '*.xz' -print0 \\`\n- `| xargs -0r -P4 -n16 xz -T1`\n- `The  -P  option to xargs(1) sets the number of parallel xz processes.  The best value for the`\n- `of  files,  the value should probably be 1; with tens of thousands of files, 100 or even more`\n- `may be appropriate to reduce the number of xz processes that xargs(1) will eventually create.`\n- `The option -T1 for xz is there to force it to single-threaded mode, because xargs(1) is  used`\n- `to control the amount of parallelization.`\n- `Calculate how many bytes have been saved in total after compressing multiple files:`\n- `xz --robot --list *.xz | awk '/^totals/{print $5-$4}'`\n- `A  script may want to know that it is using new enough xz.  The following sh(1) script checks`\n- `that the version number of the xz tool is at least 5.0.0.  This method is compatible with old`\n- `beta versions, which didn't support the --robot option:`\n- `if ! eval \"$(xz --robot --version 2> /dev/null)\" ||`\n- `[ \"$XZVERSION\" -lt 50000002 ]; then`\n- `echo \"Your xz is too old.\"`\n- `fi`\n- `unset XZVERSION LIBLZMAVERSION`\n- `Set a memory usage limit for decompression using XZOPT, but if a limit has already been set,`\n- `don't increase it:`\n- `NEWLIM=$((123 << 20))  # 123 MiB`\n- `OLDLIM=$(xz --robot --info-memory | cut -f3)`\n- `if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then`\n- `XZOPT=\"$XZOPT --memlimit-decompress=$NEWLIM\"`\n- `export XZOPT`\n- `fi`\n- `The simplest use for custom filter chains is customizing a LZMA2 preset.  This can be useful,`\n- `because the presets cover only a subset of the potentially useful combinations of compression`\n- `settings.`\n- `The CompCPU columns of the tables from the descriptions of the options -0 ...  -9  and  --ex‐‐`\n- `treme  are useful when customizing LZMA2 presets.  Here are the relevant parts collected from`\n- `those two tables:`\n- `Preset   CompCPU`\n- `-0         0`\n- `-1         1`\n- `-2         2`\n- `-3         3`\n- `-4         4`\n- `-5         5`\n- `-6         6`\n- `-5e        7`\n- `-6e        8`\n- `If you know that a file requires somewhat big dictionary (for example,  32 MiB)  to  compress`\n- `well,  but  you  want to compress it quicker than xz -8 would do, a preset with a low CompCPU`\n- `value (for example, 1) can be modified to use a bigger dictionary:`\n- `xz --lzma2=preset=1,dict=32MiB foo.tar`\n- `With certain files, the above command may be faster than xz  -6  while  compressing  signifi‐`\n- `cantly  better.   However, it must be emphasized that only some files benefit from a big dic‐`\n- `tionary while keeping the CompCPU value low.  The most obvious situation, where a big dictio‐`\n- `nary  can help a lot, is an archive containing very similar files of at least a few megabytes`\n- `each.  The dictionary size has to be significantly bigger than any individual file  to  allow`\n- `LZMA2 to take full advantage of the similarities between consecutive files.`\n- `If  very high compressor and decompressor memory usage is fine, and the file being compressed`\n- `is at least several hundred megabytes, it may be useful to use an even bigger dictionary than`\n- `the 64 MiB that xz -9 would use:`\n- `xz -vv --lzma2=dict=192MiB bigfoo.tar`\n- `Using -vv (--verbose --verbose) like in the above example can be useful to see the memory re‐`\n- `quirements of the compressor and decompressor.  Remember that using a dictionary bigger  than`\n- `the  size  of the uncompressed file is waste of memory, so the above command isn't useful for`\n- `small files.`\n- `Sometimes the compression time doesn't matter, but the decompressor memory usage  has  to  be`\n- `kept low, for example, to make it possible to decompress the file on an embedded system.  The`\n- `following command uses -6e (-6 --extreme) as a base and sets the dictionary to  only  64 KiB.`\n- `The  resulting  file can be decompressed with XZ Embedded (that's why there is --check=crc32)`\n- `using about 100 KiB of memory.`\n- `xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo`\n- `If you want to squeeze out as many bytes as possible, adjusting the number of literal context`\n- `bits  (lc) and number of position bits (pb) can sometimes help.  Adjusting the number of lit‐`\n- `eral position bits (lp) might help too, but usually lc and pb are more important.  For  exam‐`\n- `ple,  a  source  code  archive contains mostly US-ASCII text, so something like the following`\n- `might give slightly (like 0.1 %) smaller file than xz -6e (try also without lc=4):`\n- `xz --lzma2=preset=6e,pb=0,lc=4 sourcecode.tar`\n- `Using another filter together with LZMA2 can improve compression  with  certain  file  types.`\n- `For example, to compress a x86-32 or x86-64 shared library using the x86 BCJ filter:`\n- `xz --x86 --lzma2 libfoo.so`\n- `Note  that  the  order  of  the  filter  options is significant.  If --x86 is specified after`\n- `--lzma2, xz will give an error, because there cannot be any filter after LZMA2, and also  be‐`\n- `cause the x86 BCJ filter cannot be used as the last filter in the chain.`\n- `The  Delta  filter  together  with LZMA2 can give good results with bitmap images.  It should`\n- `usually beat PNG, which has a few more advanced filters than simple delta  but  uses  Deflate`\n- `for the actual compression.`\n- `The  image  has  to  be saved in uncompressed format, for example, as uncompressed TIFF.  The`\n- `distance parameter of the Delta filter is set to match the number of bytes per pixel  in  the`\n- `image.   For  example,  24-bit  RGB  bitmap needs dist=3, and it is also good to pass pb=0 to`\n- `LZMA2 to accommodate the three-byte alignment:`\n- `xz --delta=dist=3 --lzma2=pb=0 foo.tiff`\n- `If multiple images have been put into a single archive (for example, .tar), the Delta  filter`\n- `will work on that too as long as all images have the same number of bytes per pixel.`\n\n## See Also\n\n- xzdec(1)\n- xzdiff(1)\n- xzgrep(1)\n- xzless(1)\n- xzmore(1)\n- gzip(1)\n- bzip2(1)\n- 7z(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **COMMAND ALIASES** (9 lines)\n- **DESCRIPTION** (52 lines) — 2 subsections\n  - Memory usage (29 lines)\n  - Concatenation and padding with .xz files (10 lines)\n- **OPTIONS** (1 lines) — 33 subsections\n  - Integer suffixes and special values (15 lines)\n  - Operation mode (2 lines)\n  - -z --compress (4 lines)\n  - -d --decompress --uncompress (2 lines)\n  - -t --test (4 lines)\n  - -l --list (14 lines)\n  - Operation modifiers (1 lines)\n  - -k --keep (7 lines)\n  - -f --force (15 lines)\n  - -c --stdout --to-stdout (3 lines)\n  - --single-stream (9 lines)\n  - --no-sparse (7 lines)\n  - -S --suffix= (23 lines)\n  - Basic file format and compression options (1 lines)\n  - -F --format= (18 lines)\n  - -C --check= (21 lines)\n  - --ignore-check (12 lines)\n  - -0 -9 (68 lines)\n  - -e --extreme (24 lines)\n  - --fast (104 lines)\n  - -M --memlimit= --memory= (3 lines)\n  - --no-adjust (5 lines)\n  - -T --threads= (14 lines)\n  - Custom compressor filter chains (262 lines)\n  - Other options (1 lines)\n  - -q --quiet (4 lines)\n  - -v --verbose (33 lines)\n  - -Q --no-warn (4 lines)\n  - --robot (5 lines)\n  - --info-memory (4 lines)\n  - -h --help (3 lines)\n  - -H --long-help (2 lines)\n  - -V --version (3 lines)\n- **ROBOT MODE** (5 lines) — 4 subsections\n  - Version (18 lines)\n  - Memory limit information (13 lines)\n  - List mode (16 lines)\n  - summary (87 lines)\n- **EXIT STATUS** (8 lines)\n- **ENVIRONMENT** (24 lines)\n- **LZMA UTILS COMPATIBILITY** (5 lines) — 4 subsections\n  - Compression preset levels (34 lines)\n  - Streamed vs. non-streamed .lzma files (13 lines)\n  - Unsupported .lzma files (15 lines)\n  - Trailing garbage (8 lines)\n- **NOTES** (1 lines) — 2 subsections\n  - Compressed output may vary (11 lines)\n  - Embedded .xz decompressors (11 lines)\n- **EXAMPLES** (1 lines) — 5 subsections\n  - Basics (19 lines)\n  - Parallel compression of many files (6 lines)\n  - -n (6 lines)\n  - Robot mode (24 lines)\n  - Custom compressor filter chains (82 lines)\n- **SEE ALSO** (9 lines)\n\n## Full Content\n\n### NAME\n\nxz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files\n\n### SYNOPSIS\n\nxz [option...]  [file...]\n\n### COMMAND ALIASES\n\nunxz is equivalent to xz --decompress.\nxzcat is equivalent to xz --decompress --stdout.\nlzma is equivalent to xz --format=lzma.\nunlzma is equivalent to xz --format=lzma --decompress.\nlzcat is equivalent to xz --format=lzma --decompress --stdout.\n\nWhen  writing scripts that need to decompress files, it is recommended to always use the name\nxz with appropriate arguments (xz -d or xz -dc) instead of the names unxz and xzcat.\n\n### DESCRIPTION\n\nxz is a general-purpose data compression tool with command line syntax similar to gzip(1) and\nbzip2(1).  The native file format is the .xz format, but the legacy .lzma format used by LZMA\nUtils and raw compressed streams with no container format headers are also supported.\n\nxz compresses or decompresses each file according to the  selected  operation  mode.   If  no\nfiles  are  given or file is -, xz reads from standard input and writes the processed data to\nstandard output.  xz will refuse (display an error and skip the  file)  to  write  compressed\ndata  to  standard  output if it is a terminal.  Similarly, xz will refuse to read compressed\ndata from standard input if it is a terminal.\n\nUnless --stdout is specified, files other than - are written to a new file whose name is  de‐\nrived from the source file name:\n\n•  When  compressing,  the suffix of the target file format (.xz or .lzma) is appended to the\nsource filename to get the target filename.\n\n•  When decompressing, the .xz or .lzma suffix is removed from the filename to get the target\nfilename.   xz also recognizes the suffixes .txz and .tlz, and replaces them with the .tar\nsuffix.\n\nIf the target file already exists, an error is displayed and the file is skipped.\n\nUnless writing to standard output, xz will display a warning and skip the file if any of  the\nfollowing applies:\n\n•  File  is  not a regular file.  Symbolic links are not followed, and thus they are not con‐\nsidered to be regular files.\n\n•  File has more than one hard link.\n\n•  File has setuid, setgid, or sticky bit set.\n\n•  The operation mode is set to compress and the file already has a suffix of the target file\nformat (.xz or .txz when compressing to the .xz format, and .lzma or .tlz when compressing\nto the .lzma format).\n\n•  The operation mode is set to decompress and the file doesn't have a suffix of any  of  the\nsupported file formats (.xz, .txz, .lzma, or .tlz).\n\nAfter successfully compressing or decompressing the file, xz copies the owner, group, permis‐\nsions, access time, and modification time from the source file to the target file.  If  copy‐\ning  the group fails, the permissions are modified so that the target file doesn't become ac‐\ncessible to users who didn't have permission to access the source file.  xz  doesn't  support\ncopying other metadata like access control lists or extended attributes yet.\n\nOnce  the  target file has been successfully closed, the source file is removed unless --keep\nwas specified.  The source file is never removed if the output is written to standard output.\n\nSending SIGINFO or SIGUSR1 to the xz process makes it print progress information to  standard\nerror.   This  has  only limited use since when standard error is a terminal, using --verbose\nwill display an automatically updating progress indicator.\n\n#### Memory usage\n\nThe memory usage of xz varies from a few hundred kilobytes to several gigabytes depending  on\nthe compression settings.  The settings used when compressing a file determine the memory re‐\nquirements of the decompressor.  Typically the decompressor needs 5 % to 20 % of  the  amount\nof  memory  that  the compressor needed when creating the file.  For example, decompressing a\nfile created with xz -9 currently requires 65 MiB of memory.  Still, it is possible  to  have\n.xz files that require several gigabytes of memory to decompress.\n\nEspecially  users of older systems may find the possibility of very large memory usage annoy‐\ning.  To prevent uncomfortable surprises, xz has a built-in memory usage  limiter,  which  is\ndisabled  by default.  While some operating systems provide ways to limit the memory usage of\nprocesses, relying on it wasn't deemed to be flexible enough (for example, using ulimit(1) to\nlimit virtual memory tends to cripple mmap(2)).\n\nThe memory usage limiter can be enabled with the command line option --memlimit=limit.  Often\nit is more convenient to enable the limiter by default by setting  the  environment  variable\nXZDEFAULTS,  for  example,  XZDEFAULTS=--memlimit=150MiB.  It is possible to set the limits\nseparately for compression and decompression by using  --memlimit-compress=limit  and  --mem‐‐\nlimit-decompress=limit.  Using these two options outside XZDEFAULTS is rarely useful because\na single run of xz cannot do both compression and decompression and --memlimit=limit  (or  -M\nlimit) is shorter to type on the command line.\n\nIf  the specified memory usage limit is exceeded when decompressing, xz will display an error\nand decompressing the file will fail.  If the limit is exceeded when compressing, xz will try\nto  scale the settings down so that the limit is no longer exceeded (except when using --for‐‐\nmat=raw or --no-adjust).  This way the operation won't fail unless the limit is  very  small.\nThe  scaling of the settings is done in steps that don't match the compression level presets,\nfor example, if the limit is only slightly less than the amount required for xz -9, the  set‐\ntings will be scaled down only a little, not all the way down to xz -8.\n\n#### Concatenation and padding with .xz files\n\nIt is possible to concatenate .xz files as is.  xz will decompress such files as if they were\na single .xz file.\n\nIt is possible to insert padding between the concatenated parts or after the last part.   The\npadding  must  consist  of  null bytes and the size of the padding must be a multiple of four\nbytes.  This can be useful, for example, if the .xz file is stored on a medium that  measures\nfile sizes in 512-byte blocks.\n\nConcatenation and padding are not allowed with .lzma files or raw streams.\n\n### OPTIONS\n\n#### Integer suffixes and special values\n\nIn most places where an integer argument is expected, an optional suffix is supported to eas‐\nily indicate large integers.  There must be no space between the integer and the suffix.\n\nKiB    Multiply the integer by 1,024 (2^10).  Ki, k, kB, K, and KB are accepted  as  synonyms\nfor KiB.\n\nMiB    Multiply  the  integer by 1,048,576 (2^20).  Mi, m, M, and MB are accepted as synonyms\nfor MiB.\n\nGiB    Multiply the integer by 1,073,741,824 (2^30).  Gi, g, G, and GB are accepted  as  syn‐\nonyms for GiB.\n\nThe  special value max can be used to indicate the maximum integer value supported by the op‐\ntion.\n\n#### Operation mode\n\nIf multiple operation mode options are given, the last one takes effect.\n\n#### -z --compress\n\nCompress.  This is the default operation mode when no operation mode option is  speci‐\nfied  and  no other operation mode is implied from the command name (for example, unxz\nimplies --decompress).\n\n#### -d --decompress --uncompress\n\nDecompress.\n\n#### -t --test\n\nTest the integrity of compressed files.  This option  is  equivalent  to  --decompress\n--stdout  except  that  the decompressed data is discarded instead of being written to\nstandard output.  No files are created or removed.\n\n#### -l --list\n\nPrint information about compressed files.  No uncompressed output is produced, and  no\nfiles  are  created  or removed.  In list mode, the program cannot read the compressed\ndata from standard input or from other unseekable sources.\n\nThe default listing shows basic information about files, one file per  line.   To  get\nmore  detailed information, use also the --verbose option.  For even more information,\nuse --verbose twice, but note that this may be slow, because getting all the extra in‐\nformation  requires many seeks.  The width of verbose output exceeds 80 characters, so\npiping the output to, for example, less -S may be convenient  if  the  terminal  isn't\nwide enough.\n\nThe  exact  output  may  vary between xz versions and different locales.  For machine-\nreadable output, --robot --list should be used.\n\n#### Operation modifiers\n\n#### -k --keep\n\nDon't delete the input files.\n\nSince xz 5.4.0, this option also makes xz compress or decompress even if the input  is\na  symbolic  link  to  a regular file, has more than one hard link, or has the setuid,\nsetgid, or sticky bit set.  The setuid, setgid, and sticky bits are not copied to  the\ntarget file.  In earlier versions this was only done with --force.\n\n#### -f --force\n\nThis option has several effects:\n\n•  If the target file already exists, delete it before compressing or decompressing.\n\n•  Compress  or decompress even if the input is a symbolic link to a regular file, has\nmore than one hard link, or has the setuid, setgid, or sticky bit set.  The setuid,\nsetgid, and sticky bits are not copied to the target file.\n\n•  When used with --decompress --stdout and xz cannot recognize the type of the source\nfile, copy the source file as is to standard output.  This allows xzcat --force  to\nbe  used like cat(1) for files that have not been compressed with xz.  Note that in\nfuture, xz might support new compressed file formats, which may make xz  decompress\nmore  types  of  files  instead  of  copying them as is to standard output.  --for‐‐\nmat=format can be used to restrict xz to decompress only a single file format.\n\n#### -c --stdout --to-stdout\n\nWrite the compressed or decompressed data to standard output instead of a file.   This\nimplies --keep.\n\n#### --single-stream\n\nDecompress  only  the  first  .xz stream, and silently ignore possible remaining input\ndata following the stream.  Normally such trailing garbage makes xz display an error.\n\nxz never decompresses more than one stream from .lzma files or raw streams,  but  this\noption  still  makes  xz ignore the possible trailing data after the .lzma file or raw\nstream.\n\nThis option has no effect if the operation mode is not --decompress or --test.\n\n#### --no-sparse\n\nDisable creation of sparse files.  By default, if decompressing into a  regular  file,\nxz  tries  to make the file sparse if the decompressed data contains long sequences of\nbinary zeros.  It also works when writing to standard output as long as standard  out‐\nput  is  connected to a regular file and certain additional conditions are met to make\nit safe.  Creating sparse files may save disk space and speed up the decompression  by\nreducing the amount of disk I/O.\n\n#### -S --suffix=\n\nWhen  compressing, use .suf as the suffix for the target file instead of .xz or .lzma.\nIf not writing to standard output and the source file already has the suffix  .suf,  a\nwarning is displayed and the file is skipped.\n\nWhen decompressing, recognize files with the suffix .suf in addition to files with the\n.xz, .txz, .lzma, or .tlz suffix.  If the source file has the suffix .suf, the  suffix\nis removed to get the target filename.\n\nWhen  compressing  or decompressing raw streams (--format=raw), the suffix must always\nbe specified unless writing to standard output, because there is no default suffix for\nraw streams.\n\n--files[=file]\nRead  the  filenames to process from file; if file is omitted, filenames are read from\nstandard input.  Filenames must be terminated with the newline character.  A dash  (-)\nis  taken  as  a  regular  filename; it doesn't mean standard input.  If filenames are\ngiven also as command line arguments, they are processed  before  the  filenames  read\nfrom file.\n\n--files0[=file]\nThis  is identical to --files[=file] except that each filename must be terminated with\nthe null character.\n\n#### Basic file format and compression options\n\n#### -F --format=\n\nSpecify the file format to compress or decompress:\n\nauto   This is the default.  When compressing, auto is equivalent to xz.  When  decom‐\npressing,  the  format  of the input file is automatically detected.  Note that\nraw streams (created with --format=raw) cannot be auto-detected.\n\nxz     Compress to the .xz file format, or accept only .xz files when decompressing.\n\nlzma, alone\nCompress to the legacy .lzma file format, or accept only .lzma files  when  de‐\ncompressing.   The alternative name alone is provided for backwards compatibil‐\nity with LZMA Utils.\n\nraw    Compress or uncompress a raw stream (no headers).  This is meant  for  advanced\nusers  only.   To  decode raw streams, you need use --format=raw and explicitly\nspecify the filter chain, which normally would have been  stored  in  the  con‐\ntainer headers.\n\n#### -C --check=\n\nSpecify  the  type  of  the  integrity check.  The check is calculated from the uncom‐\npressed data and stored in the .xz file.  This option has an  effect  only  when  com‐\npressing  into the .xz format; the .lzma format doesn't support integrity checks.  The\nintegrity check (if any) is verified when the .xz file is decompressed.\n\nSupported check types:\n\nnone   Don't calculate an integrity check at all.  This is usually a bad  idea.   This\ncan be useful when integrity of the data is verified by other means anyway.\n\ncrc32  Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet).\n\ncrc64  Calculate CRC64 using the polynomial from ECMA-182.  This is the default, since\nit is slightly better than CRC32 at detecting damaged files and the speed  dif‐\nference is negligible.\n\nsha256 Calculate SHA-256.  This is somewhat slower than CRC32 and CRC64.\n\nIntegrity  of  the  .xz  headers is always verified with CRC32.  It is not possible to\nchange or disable it.\n\n#### --ignore-check\n\nDon't verify the integrity check of the compressed data when decompressing.  The CRC32\nvalues in the .xz headers will still be verified normally.\n\nDo  not  use  this option unless you know what you are doing.  Possible reasons to use\nthis option:\n\n•  Trying to recover data from a corrupt .xz file.\n\n•  Speeding up decompression.  This matters mostly with SHA-256  or  with  files  that\nhave  compressed  extremely well.  It's recommended to not use this option for this\npurpose unless the file integrity is verified externally in some other way.\n\n#### -0 -9\n\nSelect a compression preset level.  The default is -6.  If multiple preset levels  are\nspecified, the last one takes effect.  If a custom filter chain was already specified,\nsetting a compression preset level clears the custom filter chain.\n\nThe differences between the  presets  are  more  significant  than  with  gzip(1)  and\nbzip2(1).   The selected compression settings determine the memory requirements of the\ndecompressor, thus using a too high preset level might make it painful  to  decompress\nthe  file  on  an  old  system with little RAM.  Specifically, it's not a good idea to\nblindly use -9 for everything like it often is with gzip(1) and bzip2(1).\n\n-0 ... -3\nThese are somewhat fast presets.  -0 is sometimes faster  than  gzip  -9  while\ncompressing  much  better.   The  higher  ones  often  have speed comparable to\nbzip2(1) with comparable or better compression ratio, although the results  de‐\npend a lot on the type of data being compressed.\n\n-4 ... -6\nGood  to  very good compression while keeping decompressor memory usage reason‐\nable even for old systems.  -6 is the default, which is usually a  good  choice\nfor distributing files that need to be decompressible even on systems with only\n16 MiB RAM.  (-5e or -6e may be worth considering too.  See --extreme.)\n\n-7 ... -9\nThese are like -6 but with higher compressor and decompressor  memory  require‐\nments.  These are useful only when compressing files bigger than 8 MiB, 16 MiB,\nand 32 MiB, respectively.\n\nOn the same hardware, the decompression speed is approximately a  constant  number  of\nbytes  of compressed data per second.  In other words, the better the compression, the\nfaster the decompression will usually be.  This also means that the amount  of  uncom‐\npressed output produced per second can vary a lot.\n\nThe following table summarises the features of the presets:\n\nPreset   DictSize   CompCPU   CompMem   DecMem\n-0     256 KiB       0        3 MiB    1 MiB\n-1       1 MiB       1        9 MiB    2 MiB\n-2       2 MiB       2       17 MiB    3 MiB\n-3       4 MiB       3       32 MiB    5 MiB\n-4       4 MiB       4       48 MiB    5 MiB\n-5       8 MiB       5       94 MiB    9 MiB\n-6       8 MiB       6       94 MiB    9 MiB\n-7      16 MiB       6      186 MiB   17 MiB\n-8      32 MiB       6      370 MiB   33 MiB\n-9      64 MiB       6      674 MiB   65 MiB\n\nColumn descriptions:\n\n•  DictSize  is  the LZMA2 dictionary size.  It is waste of memory to use a dictionary\nbigger than the size of the uncompressed file.  This is why it is good to avoid us‐\ning the presets -7 ... -9 when there's no real need for them.  At -6 and lower, the\namount of memory wasted is usually low enough to not matter.\n\n•  CompCPU is a simplified representation of the LZMA2 settings that  affect  compres‐\nsion  speed.   The  dictionary size affects speed too, so while CompCPU is the same\nfor levels -6 ... -9, higher levels still tend to be a little slower.  To get  even\nslower and thus possibly better compression, see --extreme.\n\n•  CompMem  contains  the  compressor memory requirements in the single-threaded mode.\nIt may vary slightly between xz versions.  Memory requirements of some of  the  fu‐\nture  multithreaded  modes  may  be  dramatically  higher  than that of the single-\nthreaded mode.\n\n•  DecMem contains the decompressor memory requirements.   That  is,  the  compression\nsettings  determine  the memory requirements of the decompressor.  The exact decom‐\npressor memory usage is slightly more than the LZMA2 dictionary size, but the  val‐\nues in the table have been rounded up to the next full MiB.\n\n#### -e --extreme\n\nUse a slower variant of the selected compression preset level (-0 ... -9) to hopefully\nget a little bit better compression ratio, but with bad luck this  can  also  make  it\nworse.   Decompressor  memory  usage  is not affected, but compressor memory usage in‐\ncreases a little at preset levels -0 ... -3.\n\nSince there are two presets with dictionary sizes 4 MiB and 8 MiB, the presets -3e and\n-5e use slightly faster settings (lower CompCPU) than -4e and -6e, respectively.  That\nway no two presets are identical.\n\nPreset   DictSize   CompCPU   CompMem   DecMem\n-0e     256 KiB       8        4 MiB    1 MiB\n-1e       1 MiB       8       13 MiB    2 MiB\n-2e       2 MiB       8       25 MiB    3 MiB\n-3e       4 MiB       7       48 MiB    5 MiB\n-4e       4 MiB       8       48 MiB    5 MiB\n-5e       8 MiB       7       94 MiB    9 MiB\n-6e       8 MiB       8       94 MiB    9 MiB\n-7e      16 MiB       8      186 MiB   17 MiB\n-8e      32 MiB       8      370 MiB   33 MiB\n-9e      64 MiB       8      674 MiB   65 MiB\n\nFor example, there are a total of four presets that use 8 MiB dictionary, whose  order\nfrom the fastest to the slowest is -5, -6, -5e, and -6e.\n\n#### --fast\n\n--best These are somewhat misleading aliases for -0 and -9, respectively.  These are provided\nonly for backwards compatibility with LZMA Utils.  Avoid using these options.\n\n--block-size=size\nWhen compressing to the .xz format, split the input data into blocks  of  size  bytes.\nThe  blocks  are  compressed  independently  from  each other, which helps with multi-\nthreading and makes limited random-access decompression possible.  This option is typ‐\nically used to override the default block size in multi-threaded mode, but this option\ncan be used in single-threaded mode too.\n\nIn multi-threaded mode about three times size bytes will be allocated in  each  thread\nfor  buffering input and output.  The default size is three times the LZMA2 dictionary\nsize or 1 MiB, whichever is more.  Typically a good value is 2-4 times the size of the\nLZMA2 dictionary or at least 1 MiB.  Using size less than the LZMA2 dictionary size is\nwaste of RAM because then the LZMA2 dictionary buffer will never get fully used.   The\nsizes of the blocks are stored in the block headers, which a future version of xz will\nuse for multi-threaded decompression.\n\nIn single-threaded mode no block splitting is done by default.   Setting  this  option\ndoesn't  affect  memory  usage.   No size information is stored in block headers, thus\nfiles created in single-threaded mode won't be identical to files  created  in  multi-\nthreaded  mode.   The  lack of size information also means that a future version of xz\nwon't be able decompress the files in multi-threaded mode.\n\n--block-list=sizes\nWhen compressing to the .xz format, start a new block after the given intervals of un‐\ncompressed data.\n\nThe  uncompressed  sizes of the blocks are specified as a comma-separated list.  Omit‐\nting a size (two or more consecutive commas) is a shorthand to use  the  size  of  the\nprevious block.\n\nIf the input file is bigger than the sum of sizes, the last value in sizes is repeated\nuntil the end of the file.  A special value of 0 may be used as the last value to  in‐\ndicate that the rest of the file should be encoded as a single block.\n\nIf  one specifies sizes that exceed the encoder's block size (either the default value\nin threaded mode or the value specified with --block-size=size), the encoder will cre‐\nate  additional  blocks while keeping the boundaries specified in sizes.  For example,\nif one specifies --block-size=10MiB --block-list=5MiB,10MiB,8MiB,12MiB,24MiB  and  the\ninput  file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and\n1 MiB.\n\nIn multi-threaded mode the sizes of the blocks are stored in the block headers.   This\nisn't  done  in single-threaded mode, so the encoded output won't be identical to that\nof the multi-threaded mode.\n\n--flush-timeout=timeout\nWhen compressing, if more than timeout milliseconds (a positive  integer)  has  passed\nsince  the  previous  flush  and reading more input would block, all the pending input\ndata is flushed from the encoder and made available in the output stream.  This can be\nuseful  if xz is used to compress data that is streamed over a network.  Small timeout\nvalues make the data available at the receiving end with  a  small  delay,  but  large\ntimeout values give better compression ratio.\n\nThis  feature is disabled by default.  If this option is specified more than once, the\nlast one takes effect.  The special timeout value of 0 can be used to explicitly  dis‐\nable this feature.\n\nThis feature is not available on non-POSIX systems.\n\nThis  feature is still experimental.  Currently xz is unsuitable for decompressing the\nstream in real time due to how xz does buffering.\n\n--memlimit-compress=limit\nSet a memory usage limit for compression.  If this option is specified multiple times,\nthe last one takes effect.\n\nIf the compression settings exceed the limit, xz will adjust the settings downwards so\nthat the limit is no longer exceeded and display a notice  that  automatic  adjustment\nwas  done.   Such  adjustments  are  not made when compressing with --format=raw or if\n--no-adjust has been specified.  In those cases, an error is  displayed  and  xz  will\nexit with exit status 1.\n\nThe limit can be specified in multiple ways:\n\n•  The  limit can be an absolute value in bytes.  Using an integer suffix like MiB can\nbe useful.  Example: --memlimit-compress=80MiB\n\n•  The limit can be specified as a percentage of total physical  memory  (RAM).   This\ncan  be  useful  especially  when setting the XZDEFAULTS environment variable in a\nshell initialization script that is shared between different computers.   That  way\nthe  limit  is  automatically  bigger on systems with more memory.  Example: --mem‐‐\nlimit-compress=70%\n\n•  The limit can be reset back to its default value by setting it to 0.  This is  cur‐\nrently equivalent to setting the limit to max (no memory usage limit).  Once multi‐\nthreading support has been implemented, there may be a difference between 0 and max\nfor  the multithreaded case, so it is recommended to use 0 instead of max until the\ndetails have been decided.\n\nFor 32-bit xz there is a special case: if the limit would be over 4020 MiB, the  limit\nis set to 4020 MiB.  (The values 0 and max aren't affected by this.  A similar feature\ndoesn't exist for decompression.)  This can be helpful when a  32-bit  executable  has\naccess to 4 GiB address space while hopefully doing no harm in other situations.\n\nSee also the section Memory usage.\n\n--memlimit-decompress=limit\nSet  a  memory  usage limit for decompression.  This also affects the --list mode.  If\nthe operation is not possible without exceeding the limit, xz will  display  an  error\nand decompressing the file will fail.  See --memlimit-compress=limit for possible ways\nto specify the limit.\n\n#### -M --memlimit= --memory=\n\nThis  is  equivalent   to   specifying   --memlimit-compress=limit   --memlimit-decom‐‐\npress=limit.\n\n#### --no-adjust\n\nDisplay  an  error and exit if the compression settings exceed the memory usage limit.\nThe default is to adjust the settings downwards so that the memory usage limit is  not\nexceeded.   Automatic  adjusting  is always disabled when creating raw streams (--for‐‐\nmat=raw).\n\n#### -T --threads=\n\nSpecify the number of worker threads to use.  Setting threads to  a  special  value  0\nmakes  xz use as many threads as there are CPU cores on the system.  The actual number\nof threads can be less than threads if the input file is not big enough for  threading\nwith the given settings or if using more threads would exceed the memory usage limit.\n\nCurrently  the  only  threading  method is to split the input into blocks and compress\nthem independently from each other.  The default block size depends on the compression\nlevel and can be overridden with the --block-size=size option.\n\nThreaded  decompression  hasn't been implemented yet.  It will only work on files that\ncontain multiple blocks with size information in block headers.  All files  compressed\nin  multi-threaded  mode  meet this condition, but files compressed in single-threaded\nmode don't even if --block-size=size is used.\n\n#### Custom compressor filter chains\n\nA custom filter chain allows specifying the compression settings in detail instead of relying\non  the  settings associated to the presets.  When a custom filter chain is specified, preset\noptions (-0 ... -9 and --extreme) earlier on the command line are forgotten.  If a preset op‐\ntion  is specified after one or more custom filter chain options, the new preset takes effect\nand the custom filter chain options specified earlier are forgotten.\n\nA filter chain is comparable to piping on the command line.   When  compressing,  the  uncom‐\npressed  input  goes to the first filter, whose output goes to the next filter (if any).  The\noutput of the last filter gets written to the compressed file.  The maximum number of filters\nin the chain is four, but typically a filter chain has only one or two filters.\n\nMany filters have limitations on where they can be in the filter chain: some filters can work\nonly as the last filter in the chain, some only as a non-last filter, and some  work  in  any\nposition  in  the  chain.  Depending on the filter, this limitation is either inherent to the\nfilter design or exists to prevent security issues.\n\nA custom filter chain is specified by using one or more filter options in the order they  are\nwanted  in  the filter chain.  That is, the order of filter options is significant!  When de‐\ncoding raw streams (--format=raw), the filter chain is specified in the same order as it  was\nspecified when compressing.\n\nFilters  take filter-specific options as a comma-separated list.  Extra commas in options are\nignored.  Every option has a default value, so you need to specify only  those  you  want  to\nchange.\n\nTo  see  the whole filter chain and options, use xz -vv (that is, use --verbose twice).  This\nworks also for viewing the filter chain options used by presets.\n\n--lzma1[=options]\n--lzma2[=options]\nAdd LZMA1 or LZMA2 filter to the filter chain.  These filters can be used only as  the\nlast filter in the chain.\n\nLZMA1  is  a  legacy  filter, which is supported almost solely due to the legacy .lzma\nfile format, which supports only LZMA1.  LZMA2 is an updated version of LZMA1  to  fix\nsome  practical  issues of LZMA1.  The .xz format uses LZMA2 and doesn't support LZMA1\nat all.  Compression speed and ratios of LZMA1 and LZMA2 are practically the same.\n\nLZMA1 and LZMA2 share the same set of options:\n\npreset=preset\nReset all LZMA1 or LZMA2 options to preset.   Preset  consist  of  an  integer,\nwhich  may  be  followed by single-letter preset modifiers.  The integer can be\nfrom 0 to 9, matching the command line options -0 ... -9.  The  only  supported\nmodifier  is  currently e, which matches --extreme.  If no preset is specified,\nthe default values of LZMA1 or LZMA2 options are taken from the preset 6.\n\ndict=size\nDictionary (history buffer) size indicates how many bytes of the recently  pro‐\ncessed  uncompressed  data  is kept in memory.  The algorithm tries to find re‐\npeating byte sequences (matches) in the uncompressed  data,  and  replace  them\nwith  references  to the data currently in the dictionary.  The bigger the dic‐\ntionary, the higher is the chance to find a match.  Thus, increasing dictionary\nsize  usually  improves compression ratio, but a dictionary bigger than the un‐\ncompressed file is waste of memory.\n\nTypical dictionary size is from 64 KiB to 64 MiB.  The minimum is  4 KiB.   The\nmaximum  for compression is currently 1.5 GiB (1536 MiB).  The decompressor al‐\nready supports dictionaries up to one byte less than 4 GiB, which is the  maxi‐\nmum for the LZMA1 and LZMA2 stream formats.\n\nDictionary  size  and  match finder (mf) together determine the memory usage of\nthe LZMA1 or LZMA2 encoder.  The same (or bigger) dictionary size  is  required\nfor  decompressing that was used when compressing, thus the memory usage of the\ndecoder is determined by the dictionary size used when  compressing.   The  .xz\nheaders  store  the  dictionary  size  either as 2^n or 2^n + 2^(n-1), so these\nsizes are somewhat preferred for compression.  Other sizes will get rounded  up\nwhen stored in the .xz headers.\n\nlc=lc  Specify  the  number of literal context bits.  The minimum is 0 and the maximum\nis 4; the default is 3.  In addition, the sum of lc and lp must not exceed 4.\n\nAll bytes that cannot be encoded as matches are encoded as literals.  That  is,\nliterals are simply 8-bit bytes that are encoded one at a time.\n\nThe literal coding makes an assumption that the highest lc bits of the previous\nuncompressed byte correlate with the next byte.  For example, in  typical  Eng‐\nlish text, an upper-case letter is often followed by a lower-case letter, and a\nlower-case letter is usually followed by another lower-case letter.  In the US-\nASCII  character set, the highest three bits are 010 for upper-case letters and\n011 for lower-case letters.  When lc is at least 3, the literal coding can take\nadvantage of this property in the uncompressed data.\n\nThe  default  value (3) is usually good.  If you want maximum compression, test\nlc=4.  Sometimes it helps a little, and sometimes it makes  compression  worse.\nIf it makes it worse, test lc=2 too.\n\nlp=lp  Specify  the number of literal position bits.  The minimum is 0 and the maximum\nis 4; the default is 0.\n\nLp affects what kind of alignment in the uncompressed data is assumed when  en‐\ncoding literals.  See pb below for more information about alignment.\n\npb=pb  Specify  the  number  of position bits.  The minimum is 0 and the maximum is 4;\nthe default is 2.\n\nPb affects what kind of alignment in the uncompressed data is assumed  in  gen‐\neral.   The  default  means  four-byte alignment (2^pb=2^2=4), which is often a\ngood choice when there's no better guess.\n\nWhen the aligment is known, setting pb accordingly may reduce the file  size  a\nlittle.   For  example,  with  text  files having one-byte alignment (US-ASCII,\nISO-8859-*, UTF-8), setting pb=0 can improve compression slightly.  For  UTF-16\ntext,  pb=1  is a good choice.  If the alignment is an odd number like 3 bytes,\npb=0 might be the best choice.\n\nEven though the assumed alignment can be adjusted with pb  and  lp,  LZMA1  and\nLZMA2  still  slightly  favor 16-byte alignment.  It might be worth taking into\naccount when designing file formats that are likely to be often compressed with\nLZMA1 or LZMA2.\n\nmf=mf  Match finder has a major effect on encoder speed, memory usage, and compression\nratio.  Usually Hash Chain match finders are  faster  than  Binary  Tree  match\nfinders.   The  default depends on the preset: 0 uses hc3, 1-3 use hc4, and the\nrest use bt4.\n\nThe following match finders are supported.  The memory usage formulas below are\nrough  approximations, which are closest to the reality when dict is a power of\ntwo.\n\nhc3    Hash Chain with 2- and 3-byte hashing\nMinimum value for nice: 3\nMemory usage:\ndict * 7.5 (if dict <= 16 MiB);\ndict * 5.5 + 64 MiB (if dict > 16 MiB)\n\nhc4    Hash Chain with 2-, 3-, and 4-byte hashing\nMinimum value for nice: 4\nMemory usage:\ndict * 7.5 (if dict <= 32 MiB);\ndict * 6.5 (if dict > 32 MiB)\n\nbt2    Binary Tree with 2-byte hashing\nMinimum value for nice: 2\nMemory usage: dict * 9.5\n\nbt3    Binary Tree with 2- and 3-byte hashing\nMinimum value for nice: 3\nMemory usage:\ndict * 11.5 (if dict <= 16 MiB);\ndict * 9.5 + 64 MiB (if dict > 16 MiB)\n\nbt4    Binary Tree with 2-, 3-, and 4-byte hashing\nMinimum value for nice: 4\nMemory usage:\ndict * 11.5 (if dict <= 32 MiB);\ndict * 10.5 (if dict > 32 MiB)\n\nmode=mode\nCompression mode specifies the method to analyze the data produced by the match\nfinder.   Supported modes are fast and normal.  The default is fast for presets\n0-3 and normal for presets 4-9.\n\nUsually fast is used with Hash Chain match finders and normal with Binary  Tree\nmatch finders.  This is also what the presets do.\n\nnice=nice\nSpecify what is considered to be a nice length for a match.  Once a match of at\nleast nice bytes is found, the algorithm  stops  looking  for  possibly  better\nmatches.\n\nNice  can  be 2-273 bytes.  Higher values tend to give better compression ratio\nat the expense of speed.  The default depends on the preset.\n\ndepth=depth\nSpecify the maximum search depth in the match finder.  The default is the  spe‐\ncial  value  of 0, which makes the compressor determine a reasonable depth from\nmf and nice.\n\nReasonable depth for Hash Chains is 4-100 and 16-1000 for Binary Trees.   Using\nvery high values for depth can make the encoder extremely slow with some files.\nAvoid setting the depth over 1000 unless you are prepared to interrupt the com‐\npression in case it is taking far too long.\n\nWhen decoding raw streams (--format=raw), LZMA2 needs only the dictionary size.  LZMA1\nneeds also lc, lp, and pb.\n\n--x86[=options]\n--powerpc[=options]\n--ia64[=options]\n--arm[=options]\n--armthumb[=options]\n--sparc[=options]\nAdd a branch/call/jump (BCJ) filter to the filter chain.  These filters  can  be  used\nonly as a non-last filter in the filter chain.\n\nA  BCJ  filter converts relative addresses in the machine code to their absolute coun‐\nterparts.  This doesn't change the size of the  data,  but  it  increases  redundancy,\nwhich  can  help LZMA2 to produce 0-15 % smaller .xz file.  The BCJ filters are always\nreversible, so using a BCJ filter for wrong type of data doesn't cause any data  loss,\nalthough it may make the compression ratio slightly worse.\n\nIt  is  fine  to apply a BCJ filter on a whole executable; there's no need to apply it\nonly on the executable section.  Applying a BCJ filter on  an  archive  that  contains\nboth  executable and non-executable files may or may not give good results, so it gen‐\nerally isn't good to blindly apply a BCJ filter when compressing binary  packages  for\ndistribution.\n\nThese BCJ filters are very fast and use insignificant amount of memory.  If a BCJ fil‐\nter improves compression ratio of a file, it can improve decompression  speed  at  the\nsame time.  This is because, on the same hardware, the decompression speed of LZMA2 is\nroughly a fixed number of bytes of compressed data per second.\n\nThese BCJ filters have known problems related to the compression ratio:\n\n•  Some types of files containing executable code (for example, object  files,  static\nlibraries,  and Linux kernel modules) have the addresses in the instructions filled\nwith filler values.  These BCJ filters will still do the address conversion,  which\nwill make the compression worse with these files.\n\n•  Applying  a  BCJ  filter  on an archive containing multiple similar executables can\nmake the compression ratio worse than not using a BCJ filter.  This is because  the\nBCJ filter doesn't detect the boundaries of the executable files, and doesn't reset\nthe address conversion counter for each executable.\n\nBoth of the above problems will be fixed in the future in a new filter.  The  old  BCJ\nfilters  will still be useful in embedded systems, because the decoder of the new fil‐\nter will be bigger and use more memory.\n\nDifferent instruction sets have different alignment:\n\nFilter      Alignment   Notes\nx86             1       32-bit or 64-bit x86\nPowerPC         4       Big endian only\nARM             4       Little endian only\nARM-Thumb       2       Little endian only\nIA-64          16       Big or little endian\nSPARC           4       Big or little endian\n\nSince the BCJ-filtered data is usually compressed with LZMA2,  the  compression  ratio\nmay  be  improved  slightly if the LZMA2 options are set to match the alignment of the\nselected BCJ filter.  For example, with the IA-64 filter, it's good to set  pb=4  with\nLZMA2 (2^4=16).  The x86 filter is an exception; it's usually good to stick to LZMA2's\ndefault four-byte alignment when compressing x86 executables.\n\nAll BCJ filters support the same options:\n\nstart=offset\nSpecify the start offset that is used when converting between relative and  ab‐\nsolute addresses.  The offset must be a multiple of the alignment of the filter\n(see the table above).  The default is zero.  In practice, the default is good;\nspecifying a custom offset is almost never useful.\n\n--delta[=options]\nAdd the Delta filter to the filter chain.  The Delta filter can be only used as a non-\nlast filter in the filter chain.\n\nCurrently only simple byte-wise delta calculation is supported.  It can be useful when\ncompressing,  for example, uncompressed bitmap images or uncompressed PCM audio.  How‐\never, special purpose algorithms may give significantly better results  than  Delta  +\nLZMA2.   This  is  true especially with audio, which compresses faster and better, for\nexample, with flac(1).\n\nSupported options:\n\ndist=distance\nSpecify the distance of the delta  calculation  in  bytes.   distance  must  be\n1-256.  The default is 1.\n\nFor example, with dist=2 and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the out‐\nput will be A1 B1 01 02 01 02 01 02.\n\n#### Other options\n\n#### -q --quiet\n\nSuppress warnings and notices.  Specify this twice to suppress errors too.   This  op‐\ntion has no effect on the exit status.  That is, even if a warning was suppressed, the\nexit status to indicate a warning is still used.\n\n#### -v --verbose\n\nBe verbose.  If standard error is connected to a terminal, xz will display a  progress\nindicator.  Specifying --verbose twice will give even more verbose output.\n\nThe progress indicator shows the following information:\n\n•  Completion  percentage  is  shown if the size of the input file is known.  That is,\nthe percentage cannot be shown in pipes.\n\n•  Amount of compressed data produced (compressing) or consumed (decompressing).\n\n•  Amount of uncompressed data consumed (compressing) or produced (decompressing).\n\n•  Compression ratio, which is calculated by dividing the amount  of  compressed  data\nprocessed so far by the amount of uncompressed data processed so far.\n\n•  Compression or decompression speed.  This is measured as the amount of uncompressed\ndata consumed (compression) or produced (decompression) per second.   It  is  shown\nafter a few seconds have passed since xz started processing the file.\n\n•  Elapsed time in the format M:SS or H:MM:SS.\n\n•  Estimated remaining time is shown only when the size of the input file is known and\na couple of seconds have already passed since xz started processing the file.   The\ntime  is  shown in a less precise format which never has any colons, for example, 2\nmin 30 s.\n\nWhen standard error is not a terminal, --verbose will make xz print the filename, com‐\npressed  size,  uncompressed  size, compression ratio, and possibly also the speed and\nelapsed time on a single line to standard error after compressing or decompressing the\nfile.  The speed and elapsed time are included only when the operation took at least a\nfew seconds.  If the operation didn't finish, for example, due to  user  interruption,\nalso the completion percentage is printed if the size of the input file is known.\n\n#### -Q --no-warn\n\nDon't set the exit status to 2 even if a condition worth a warning was detected.  This\noption doesn't affect the verbosity level, thus both --quiet and --no-warn have to  be\nused to not display warnings and to not alter the exit status.\n\n#### --robot\n\nPrint  messages in a machine-parsable format.  This is intended to ease writing front‐\nends that want to use xz instead of liblzma,  which  may  be  the  case  with  various\nscripts.   The  output  with  this  option enabled is meant to be stable across xz re‐\nleases.  See the section ROBOT MODE for details.\n\n#### --info-memory\n\nDisplay, in human-readable format, how much physical memory (RAM) xz thinks the system\nhas  and  the memory usage limits for compression and decompression, and exit success‐\nfully.\n\n#### -h --help\n\nDisplay a help message describing the most commonly used options,  and  exit  success‐\nfully.\n\n#### -H --long-help\n\nDisplay a help message describing all features of xz, and exit successfully\n\n#### -V --version\n\nDisplay  the  version  number  of xz and liblzma in human readable format.  To get ma‐\nchine-parsable output, specify --robot before --version.\n\n### ROBOT MODE\n\nThe robot mode is activated with the --robot option.  It makes the output  of  xz  easier  to\nparse  by  other  programs.   Currently  --robot  is  supported only together with --version,\n--info-memory, and --list.  It will be supported for compression and decompression in the fu‐\nture.\n\n#### Version\n\nxz --robot --version will print the version number of xz and liblzma in the following format:\n\nXZVERSION=XYYYZZZS\nLIBLZMAVERSION=XYYYZZZS\n\nX      Major version.\n\nYYY    Minor version.  Even numbers are stable.  Odd numbers are alpha or beta versions.\n\nZZZ    Patch level for stable releases or just a counter for development releases.\n\nS      Stability.   0 is alpha, 1 is beta, and 2 is stable.  S should be always 2 when YYY is\neven.\n\nXYYYZZZS are the same on both lines if xz and liblzma are from the same XZ Utils release.\n\nExamples: 4.999.9beta is 49990091 and 5.0.0 is 50000002.\n\n#### Memory limit information\n\nxz --robot --info-memory prints a single line with three tab-separated columns:\n\n1.  Total amount of physical memory (RAM) in bytes\n\n2.  Memory usage limit for compression in bytes.  A special value of zero indicates  the  de‐\nfault setting, which for single-threaded mode is the same as no limit.\n\n3.  Memory usage limit for decompression in bytes.  A special value of zero indicates the de‐\nfault setting, which for single-threaded mode is the same as no limit.\n\nIn the future, the output of xz --robot --info-memory may have more columns, but  never  more\nthan a single line.\n\n#### List mode\n\nxz  --robot  --list  uses  tab-separated output.  The first column of every line has a string\nthat indicates the type of the information found on that line:\n\nname   This is always the first line when starting to list a file.  The second column on  the\nline is the filename.\n\nfile   This  line  contains  overall  information  about  the  .xz file.  This line is always\nprinted after the name line.\n\nstream This line type is used only when --verbose was specified.  There are  as  many  stream\nlines as there are streams in the .xz file.\n\nblock  This  line  type  is  used only when --verbose was specified.  There are as many block\nlines as there are blocks in the .xz file.  The block lines are shown  after  all  the\nstream lines; different line types are not interleaved.\n\n#### summary\n\nThis  line type is used only when --verbose was specified twice.  This line is printed\nafter all block lines.  Like the file line, the summary line contains overall informa‐\ntion about the .xz file.\n\ntotals This  line is always the very last line of the list output.  It shows the total counts\nand sizes.\n\nThe columns of the file lines:\n2.  Number of streams in the file\n3.  Total number of blocks in the stream(s)\n4.  Compressed size of the file\n5.  Uncompressed size of the file\n6.  Compression ratio, for example, 0.123.  If ratio is over 9.999, three dashes (---)\nare displayed instead of the ratio.\n7.  Comma-separated list of integrity check names.  The following strings are used for\nthe known check types: None, CRC32, CRC64, and SHA-256.  For unknown check  types,\nUnknown-N  is  used,  where N is the Check ID as a decimal number (one or two dig‐\nits).\n8.  Total size of stream padding in the file\n\nThe columns of the stream lines:\n2.  Stream number (the first stream is 1)\n3.  Number of blocks in the stream\n4.  Compressed start offset\n5.  Uncompressed start offset\n6.  Compressed size (does not include stream padding)\n7.  Uncompressed size\n8.  Compression ratio\n9.  Name of the integrity check\n10. Size of stream padding\n\nThe columns of the block lines:\n2.  Number of the stream containing this block\n3.  Block number relative to the beginning of the stream (the first block is 1)\n4.  Block number relative to the beginning of the file\n5.  Compressed start offset relative to the beginning of the file\n6.  Uncompressed start offset relative to the beginning of the file\n7.  Total compressed size of the block (includes headers)\n8.  Uncompressed size\n9.  Compression ratio\n10. Name of the integrity check\n\nIf --verbose was specified twice, additional columns are included on the block lines.   These\nare  not  displayed  with  a single --verbose, because getting this information requires many\nseeks and can thus be slow:\n11. Value of the integrity check in hexadecimal\n12. Block header size\n13. Block flags: c indicates that compressed size is present, and u indicates that un‐\ncompressed  size  is present.  If the flag is not set, a dash (-) is shown instead\nto keep the string length fixed.  New flags may be added to the end of the  string\nin the future.\n14. Size  of  the actual compressed data in the block (this excludes the block header,\nblock padding, and check fields)\n15. Amount of memory (in bytes) required to decompress this block with this xz version\n16. Filter chain.  Note that most of the options used at compression  time  cannot  be\nknown,  because  only  the options that are needed for decompression are stored in\nthe .xz headers.\n\nThe columns of the summary lines:\n2.  Amount of memory (in bytes) required to decompress this file with this xz version\n3.  yes or no indicating if all block headers have both  compressed  size  and  uncom‐\npressed size stored in them\nSince xz 5.1.2alpha:\n4.  Minimum xz version required to decompress the file\n\nThe columns of the totals line:\n2.  Number of streams\n3.  Number of blocks\n4.  Compressed size\n5.  Uncompressed size\n6.  Average compression ratio\n7.  Comma-separated list of integrity check names that were present in the files\n8.  Stream padding size\n9.  Number  of  files.  This is here to keep the order of the earlier columns the same\nas on file lines.\n\nIf --verbose was specified twice, additional columns are included on the totals line:\n10. Maximum amount of memory (in bytes) required to decompress the files with this  xz\nversion\n11. yes  or  no  indicating  if all block headers have both compressed size and uncom‐\npressed size stored in them\nSince xz 5.1.2alpha:\n12. Minimum xz version required to decompress the file\n\nFuture versions may add new line types and new columns can be  added  to  the  existing  line\ntypes, but the existing columns won't be changed.\n\n### EXIT STATUS\n\n0      All is good.\n\n1      An error occurred.\n\n2      Something worth a warning occurred, but no actual errors occurred.\n\nNotices (not warnings or errors) printed on standard error don't affect the exit status.\n\n### ENVIRONMENT\n\nxz  parses  space-separated  lists  of options from the environment variables XZDEFAULTS and\nXZOPT, in this order, before parsing the options from the command line.  Note that only  op‐\ntions are parsed from the environment variables; all non-options are silently ignored.  Pars‐\ning is done with getoptlong(3) which is used also for the command line arguments.\n\nXZDEFAULTS\nUser-specific or system-wide default options.  Typically this is set in a  shell  ini‐\ntialization  script  to  enable xz's memory usage limiter by default.  Excluding shell\ninitialization scripts and similar special cases, scripts  must  never  set  or  unset\nXZDEFAULTS.\n\nXZOPT This  is for passing options to xz when it is not possible to set the options directly\non the xz command line.  This is the case when xz is run by a script or tool, for  ex‐\nample, GNU tar(1):\n\nXZOPT=-2v tar caf foo.tar.xz foo\n\nScripts  may  use  XZOPT, for example, to set script-specific default compression op‐\ntions.  It is still recommended to allow users to override XZOPT if that  is  reason‐\nable.  For example, in sh(1) scripts one may use something like this:\n\nXZOPT=${XZOPT-\"-7e\"}\nexport XZOPT\n\n### LZMA UTILS COMPATIBILITY\n\nThe  command  line syntax of xz is practically a superset of lzma, unlzma, and lzcat as found\nfrom LZMA Utils 4.32.x.  In most cases, it is possible to replace LZMA Utils  with  XZ  Utils\nwithout  breaking existing scripts.  There are some incompatibilities though, which may some‐\ntimes cause problems.\n\n#### Compression preset levels\n\nThe numbering of the compression level presets is not identical in xz and  LZMA  Utils.   The\nmost  important  difference is how dictionary sizes are mapped to different presets.  Dictio‐\nnary size is roughly equal to the decompressor memory usage.\n\nLevel     xz      LZMA Utils\n-0     256 KiB      N/A\n-1       1 MiB     64 KiB\n-2       2 MiB      1 MiB\n-3       4 MiB    512 KiB\n-4       4 MiB      1 MiB\n-5       8 MiB      2 MiB\n-6       8 MiB      4 MiB\n-7      16 MiB      8 MiB\n-8      32 MiB     16 MiB\n-9      64 MiB     32 MiB\n\nThe dictionary size differences affect the compressor memory usage too, but  there  are  some\nother differences between LZMA Utils and XZ Utils, which make the difference even bigger:\n\nLevel     xz      LZMA Utils 4.32.x\n-0       3 MiB          N/A\n-1       9 MiB          2 MiB\n-2      17 MiB         12 MiB\n-3      32 MiB         12 MiB\n-4      48 MiB         16 MiB\n-5      94 MiB         26 MiB\n-6      94 MiB         45 MiB\n-7     186 MiB         83 MiB\n-8     370 MiB        159 MiB\n-9     674 MiB        311 MiB\n\nThe default preset level in LZMA Utils is -7 while in XZ Utils it is -6, so both use an 8 MiB\ndictionary by default.\n\n#### Streamed vs. non-streamed .lzma files\n\nThe uncompressed size of the file can be stored in the .lzma header.  LZMA  Utils  does  that\nwhen compressing regular files.  The alternative is to mark that uncompressed size is unknown\nand use end-of-payload marker to indicate where the decompressor  should  stop.   LZMA  Utils\nuses  this  method  when  uncompressed  size  isn't known, which is the case, for example, in\npipes.\n\nxz supports decompressing .lzma files with or without end-of-payload marker,  but  all  .lzma\nfiles  created  by xz will use end-of-payload marker and have uncompressed size marked as un‐\nknown in the .lzma header.  This may be a problem in some uncommon situations.  For  example,\na  .lzma decompressor in an embedded device might work only with files that have known uncom‐\npressed size.  If you hit this problem, you need to use LZMA Utils  or  LZMA  SDK  to  create\n.lzma files with known uncompressed size.\n\n#### Unsupported .lzma files\n\nThe  .lzma format allows lc values up to 8, and lp values up to 4.  LZMA Utils can decompress\nfiles with any lc and lp, but always creates files with lc=3 and lp=0.  Creating  files  with\nother lc and lp is possible with xz and with LZMA SDK.\n\nThe implementation of the LZMA1 filter in liblzma requires that the sum of lc and lp must not\nexceed 4.  Thus, .lzma files, which exceed this limitation, cannot be decompressed with xz.\n\nLZMA Utils creates only .lzma files which have a dictionary size of 2^n (a power  of  2)  but\naccepts  files  with any dictionary size.  liblzma accepts only .lzma files which have a dic‐\ntionary size of 2^n or 2^n + 2^(n-1).  This is to decrease  false  positives  when  detecting\n.lzma files.\n\nThese  limitations shouldn't be a problem in practice, since practically all .lzma files have\nbeen compressed with settings that liblzma will accept.\n\n#### Trailing garbage\n\nWhen decompressing, LZMA Utils silently ignore everything after the first .lzma  stream.   In\nmost  situations, this is a bug.  This also means that LZMA Utils don't support decompressing\nconcatenated .lzma files.\n\nIf there is data left after the first .lzma stream, xz considers the file to be  corrupt  un‐\nless --single-stream was used.  This may break obscure scripts which have assumed that trail‐\ning garbage is ignored.\n\n### NOTES\n\n#### Compressed output may vary\n\nThe exact compressed output produced from the same uncompressed input file may  vary  between\nXZ Utils versions even if compression options are identical.  This is because the encoder can\nbe improved (faster or better compression) without affecting the file format.  The output can\nvary  even  between different builds of the same XZ Utils version, if different build options\nare used.\n\nThe above means that once --rsyncable has been implemented, the resulting files won't  neces‐\nsarily  be rsyncable unless both old and new files have been compressed with the same xz ver‐\nsion.  This problem can be fixed if a part of the encoder implementation is  frozen  to  keep\nrsyncable output stable across xz versions.\n\n#### Embedded .xz decompressors\n\nEmbedded  .xz  decompressor  implementations like XZ Embedded don't necessarily support files\ncreated with integrity check  types  other  than  none  and  crc32.   Since  the  default  is\n--check=crc64,  you  must  use --check=none or --check=crc32 when creating files for embedded\nsystems.\n\nOutside embedded systems, all .xz format decompressors support all the  check  types,  or  at\nleast are able to decompress the file without verifying the integrity check if the particular\ncheck is not supported.\n\nXZ Embedded supports BCJ filters, but only with the default start offset.\n\n### EXAMPLES\n\n#### Basics\n\nCompress the file foo into foo.xz using the default compression level (-6), and remove foo if\ncompression is successful:\n\nxz foo\n\nDecompress bar.xz into bar and don't remove bar.xz even if decompression is successful:\n\nxz -dk bar.xz\n\nCreate  baz.tar.xz  with  the preset -4e (-4 --extreme), which is slower than the default -6,\nbut needs less memory for compression and decompression (48 MiB and 5 MiB, respectively):\n\ntar cf - baz | xz -4e > baz.tar.xz\n\nA mix of compressed and uncompressed files can be decompressed to standard output with a sin‐\ngle command:\n\nxz -dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\n\n#### Parallel compression of many files\n\nOn GNU and *BSD, find(1) and xargs(1) can be used to parallelize compression of many files:\n\nfind . -type f \\! -name '*.xz' -print0 \\\n| xargs -0r -P4 -n16 xz -T1\n\nThe  -P  option to xargs(1) sets the number of parallel xz processes.  The best value for the\n\n#### -n\n\nof  files,  the value should probably be 1; with tens of thousands of files, 100 or even more\nmay be appropriate to reduce the number of xz processes that xargs(1) will eventually create.\n\nThe option -T1 for xz is there to force it to single-threaded mode, because xargs(1) is  used\nto control the amount of parallelization.\n\n#### Robot mode\n\nCalculate how many bytes have been saved in total after compressing multiple files:\n\nxz --robot --list *.xz | awk '/^totals/{print $5-$4}'\n\nA  script may want to know that it is using new enough xz.  The following sh(1) script checks\nthat the version number of the xz tool is at least 5.0.0.  This method is compatible with old\nbeta versions, which didn't support the --robot option:\n\nif ! eval \"$(xz --robot --version 2> /dev/null)\" ||\n[ \"$XZVERSION\" -lt 50000002 ]; then\necho \"Your xz is too old.\"\nfi\nunset XZVERSION LIBLZMAVERSION\n\nSet a memory usage limit for decompression using XZOPT, but if a limit has already been set,\ndon't increase it:\n\nNEWLIM=$((123 << 20))  # 123 MiB\nOLDLIM=$(xz --robot --info-memory | cut -f3)\nif [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\nXZOPT=\"$XZOPT --memlimit-decompress=$NEWLIM\"\nexport XZOPT\nfi\n\n#### Custom compressor filter chains\n\nThe simplest use for custom filter chains is customizing a LZMA2 preset.  This can be useful,\nbecause the presets cover only a subset of the potentially useful combinations of compression\nsettings.\n\nThe CompCPU columns of the tables from the descriptions of the options -0 ...  -9  and  --ex‐‐\ntreme  are useful when customizing LZMA2 presets.  Here are the relevant parts collected from\nthose two tables:\n\nPreset   CompCPU\n-0         0\n-1         1\n-2         2\n-3         3\n-4         4\n-5         5\n-6         6\n-5e        7\n-6e        8\n\nIf you know that a file requires somewhat big dictionary (for example,  32 MiB)  to  compress\nwell,  but  you  want to compress it quicker than xz -8 would do, a preset with a low CompCPU\nvalue (for example, 1) can be modified to use a bigger dictionary:\n\nxz --lzma2=preset=1,dict=32MiB foo.tar\n\nWith certain files, the above command may be faster than xz  -6  while  compressing  signifi‐\ncantly  better.   However, it must be emphasized that only some files benefit from a big dic‐\ntionary while keeping the CompCPU value low.  The most obvious situation, where a big dictio‐\nnary  can help a lot, is an archive containing very similar files of at least a few megabytes\neach.  The dictionary size has to be significantly bigger than any individual file  to  allow\nLZMA2 to take full advantage of the similarities between consecutive files.\n\nIf  very high compressor and decompressor memory usage is fine, and the file being compressed\nis at least several hundred megabytes, it may be useful to use an even bigger dictionary than\nthe 64 MiB that xz -9 would use:\n\nxz -vv --lzma2=dict=192MiB bigfoo.tar\n\nUsing -vv (--verbose --verbose) like in the above example can be useful to see the memory re‐\nquirements of the compressor and decompressor.  Remember that using a dictionary bigger  than\nthe  size  of the uncompressed file is waste of memory, so the above command isn't useful for\nsmall files.\n\nSometimes the compression time doesn't matter, but the decompressor memory usage  has  to  be\nkept low, for example, to make it possible to decompress the file on an embedded system.  The\nfollowing command uses -6e (-6 --extreme) as a base and sets the dictionary to  only  64 KiB.\nThe  resulting  file can be decompressed with XZ Embedded (that's why there is --check=crc32)\nusing about 100 KiB of memory.\n\nxz --check=crc32 --lzma2=preset=6e,dict=64KiB foo\n\nIf you want to squeeze out as many bytes as possible, adjusting the number of literal context\nbits  (lc) and number of position bits (pb) can sometimes help.  Adjusting the number of lit‐\neral position bits (lp) might help too, but usually lc and pb are more important.  For  exam‐\nple,  a  source  code  archive contains mostly US-ASCII text, so something like the following\nmight give slightly (like 0.1 %) smaller file than xz -6e (try also without lc=4):\n\nxz --lzma2=preset=6e,pb=0,lc=4 sourcecode.tar\n\nUsing another filter together with LZMA2 can improve compression  with  certain  file  types.\nFor example, to compress a x86-32 or x86-64 shared library using the x86 BCJ filter:\n\nxz --x86 --lzma2 libfoo.so\n\nNote  that  the  order  of  the  filter  options is significant.  If --x86 is specified after\n--lzma2, xz will give an error, because there cannot be any filter after LZMA2, and also  be‐\ncause the x86 BCJ filter cannot be used as the last filter in the chain.\n\nThe  Delta  filter  together  with LZMA2 can give good results with bitmap images.  It should\nusually beat PNG, which has a few more advanced filters than simple delta  but  uses  Deflate\nfor the actual compression.\n\nThe  image  has  to  be saved in uncompressed format, for example, as uncompressed TIFF.  The\ndistance parameter of the Delta filter is set to match the number of bytes per pixel  in  the\nimage.   For  example,  24-bit  RGB  bitmap needs dist=3, and it is also good to pass pb=0 to\nLZMA2 to accommodate the three-byte alignment:\n\nxz --delta=dist=3 --lzma2=pb=0 foo.tiff\n\nIf multiple images have been put into a single archive (for example, .tar), the Delta  filter\nwill work on that too as long as all images have the same number of bytes per pixel.\n\n### SEE ALSO\n\nxzdec(1), xzdiff(1), xzgrep(1), xzless(1), xzmore(1), gzip(1), bzip2(1), 7z(1)\n\nXZ Utils: <https://tukaani.org/xz/>\nXZ Embedded: <https://tukaani.org/xz/embedded.html>\nLZMA SDK: <http://7-zip.org/sdk.html>\n\n\n\nTukaani                                      2020-02-01                                        XZ(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "xz",
        "section": "1",
        "mode": "man",
        "summary": "xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files",
        "synopsis": "xz [option...]  [file...]",
        "flags": [
            {
                "flag": "-z",
                "long": "--compress",
                "arg": null,
                "description": "Compress. This is the default operation mode when no operation mode option is speci‐ fied and no other operation mode is implied from the command name (for example, unxz implies --decompress)."
            },
            {
                "flag": "-d",
                "long": "--uncompress",
                "arg": null,
                "description": "Decompress."
            },
            {
                "flag": "-t",
                "long": "--test",
                "arg": null,
                "description": "Test the integrity of compressed files. This option is equivalent to --decompress --stdout except that the decompressed data is discarded instead of being written to standard output. No files are created or removed."
            },
            {
                "flag": "-l",
                "long": "--list",
                "arg": null,
                "description": "Print information about compressed files. No uncompressed output is produced, and no files are created or removed. In list mode, the program cannot read the compressed data from standard input or from other unseekable sources. The default listing shows basic information about files, one file per line. To get more detailed information, use also the --verbose option. For even more information, use --verbose twice, but note that this may be slow, because getting all the extra in‐ formation requires many seeks. The width of verbose output exceeds 80 characters, so piping the output to, for example, less -S may be convenient if the terminal isn't wide enough. The exact output may vary between xz versions and different locales. For machine- readable output, --robot --list should be used."
            },
            {
                "flag": "-k",
                "long": "--keep",
                "arg": null,
                "description": "Don't delete the input files. Since xz 5.4.0, this option also makes xz compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. In earlier versions this was only done with --force."
            },
            {
                "flag": "-f",
                "long": "--force",
                "arg": null,
                "description": "This option has several effects: • If the target file already exists, delete it before compressing or decompressing. • Compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. • When used with --decompress --stdout and xz cannot recognize the type of the source file, copy the source file as is to standard output. This allows xzcat --force to be used like cat(1) for files that have not been compressed with xz. Note that in future, xz might support new compressed file formats, which may make xz decompress more types of files instead of copying them as is to standard output. --for‐‐ mat=format can be used to restrict xz to decompress only a single file format."
            },
            {
                "flag": "-c",
                "long": "--to-stdout",
                "arg": null,
                "description": "Write the compressed or decompressed data to standard output instead of a file. This implies --keep."
            },
            {
                "flag": "",
                "long": "--single-stream",
                "arg": null,
                "description": "Decompress only the first .xz stream, and silently ignore possible remaining input data following the stream. Normally such trailing garbage makes xz display an error. xz never decompresses more than one stream from .lzma files or raw streams, but this option still makes xz ignore the possible trailing data after the .lzma file or raw stream. This option has no effect if the operation mode is not --decompress or --test."
            },
            {
                "flag": "",
                "long": "--no-sparse",
                "arg": null,
                "description": "Disable creation of sparse files. By default, if decompressing into a regular file, xz tries to make the file sparse if the decompressed data contains long sequences of binary zeros. It also works when writing to standard output as long as standard out‐ put is connected to a regular file and certain additional conditions are met to make it safe. Creating sparse files may save disk space and speed up the decompression by reducing the amount of disk I/O."
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": "When compressing, use .suf as the suffix for the target file instead of .xz or .lzma. If not writing to standard output and the source file already has the suffix .suf, a warning is displayed and the file is skipped. When decompressing, recognize files with the suffix .suf in addition to files with the .xz, .txz, .lzma, or .tlz suffix. If the source file has the suffix .suf, the suffix is removed to get the target filename. When compressing or decompressing raw streams (--format=raw), the suffix must always be specified unless writing to standard output, because there is no default suffix for raw streams. --files[=file] Read the filenames to process from file; if file is omitted, filenames are read from standard input. Filenames must be terminated with the newline character. A dash (-) is taken as a regular filename; it doesn't mean standard input. If filenames are given also as command line arguments, they are processed before the filenames read from file. --files0[=file] This is identical to --files[=file] except that each filename must be terminated with the null character."
            },
            {
                "flag": "-F",
                "long": null,
                "arg": null,
                "description": "Specify the file format to compress or decompress: auto This is the default. When compressing, auto is equivalent to xz. When decom‐ pressing, the format of the input file is automatically detected. Note that raw streams (created with --format=raw) cannot be auto-detected. xz Compress to the .xz file format, or accept only .xz files when decompressing. lzma, alone Compress to the legacy .lzma file format, or accept only .lzma files when de‐ compressing. The alternative name alone is provided for backwards compatibil‐ ity with LZMA Utils. raw Compress or uncompress a raw stream (no headers). This is meant for advanced users only. To decode raw streams, you need use --format=raw and explicitly specify the filter chain, which normally would have been stored in the con‐ tainer headers."
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "Specify the type of the integrity check. The check is calculated from the uncom‐ pressed data and stored in the .xz file. This option has an effect only when com‐ pressing into the .xz format; the .lzma format doesn't support integrity checks. The integrity check (if any) is verified when the .xz file is decompressed. Supported check types: none Don't calculate an integrity check at all. This is usually a bad idea. This can be useful when integrity of the data is verified by other means anyway. crc32 Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet). crc64 Calculate CRC64 using the polynomial from ECMA-182. This is the default, since it is slightly better than CRC32 at detecting damaged files and the speed dif‐ ference is negligible. sha256 Calculate SHA-256. This is somewhat slower than CRC32 and CRC64. Integrity of the .xz headers is always verified with CRC32. It is not possible to change or disable it."
            },
            {
                "flag": "",
                "long": "--ignore-check",
                "arg": null,
                "description": "Don't verify the integrity check of the compressed data when decompressing. The CRC32 values in the .xz headers will still be verified normally. Do not use this option unless you know what you are doing. Possible reasons to use this option: • Trying to recover data from a corrupt .xz file. • Speeding up decompression. This matters mostly with SHA-256 or with files that have compressed extremely well. It's recommended to not use this option for this purpose unless the file integrity is verified externally in some other way."
            },
            {
                "flag": "-9",
                "long": null,
                "arg": null,
                "description": "Select a compression preset level. The default is -6. If multiple preset levels are specified, the last one takes effect. If a custom filter chain was already specified, setting a compression preset level clears the custom filter chain. The differences between the presets are more significant than with gzip(1) and bzip2(1). The selected compression settings determine the memory requirements of the decompressor, thus using a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, it's not a good idea to blindly use -9 for everything like it often is with gzip(1) and bzip2(1). -0 ... -3 These are somewhat fast presets. -0 is sometimes faster than gzip -9 while compressing much better. The higher ones often have speed comparable to bzip2(1) with comparable or better compression ratio, although the results de‐ pend a lot on the type of data being compressed. -4 ... -6 Good to very good compression while keeping decompressor memory usage reason‐ able even for old systems. -6 is the default, which is usually a good choice for distributing files that need to be decompressible even on systems with only 16 MiB RAM. (-5e or -6e may be worth considering too. See --extreme.) -7 ... -9 These are like -6 but with higher compressor and decompressor memory require‐ ments. These are useful only when compressing files bigger than 8 MiB, 16 MiB, and 32 MiB, respectively. On the same hardware, the decompression speed is approximately a constant number of bytes of compressed data per second. In other words, the better the compression, the faster the decompression will usually be. This also means that the amount of uncom‐ pressed output produced per second can vary a lot. The following table summarises the features of the presets: Preset DictSize CompCPU CompMem DecMem -0 256 KiB 0 3 MiB 1 MiB -1 1 MiB 1 9 MiB 2 MiB -2 2 MiB 2 17 MiB 3 MiB -3 4 MiB 3 32 MiB 5 MiB -4 4 MiB 4 48 MiB 5 MiB -5 8 MiB 5 94 MiB 9 MiB -6 8 MiB 6 94 MiB 9 MiB -7 16 MiB 6 186 MiB 17 MiB -8 32 MiB 6 370 MiB 33 MiB -9 64 MiB 6 674 MiB 65 MiB Column descriptions: • DictSize is the LZMA2 dictionary size. It is waste of memory to use a dictionary bigger than the size of the uncompressed file. This is why it is good to avoid us‐ ing the presets -7 ... -9 when there's no real need for them. At -6 and lower, the amount of memory wasted is usually low enough to not matter. • CompCPU is a simplified representation of the LZMA2 settings that affect compres‐ sion speed. The dictionary size affects speed too, so while CompCPU is the same for levels -6 ... -9, higher levels still tend to be a little slower. To get even slower and thus possibly better compression, see --extreme. • CompMem contains the compressor memory requirements in the single-threaded mode. It may vary slightly between xz versions. Memory requirements of some of the fu‐ ture multithreaded modes may be dramatically higher than that of the single- threaded mode. • DecMem contains the decompressor memory requirements. That is, the compression settings determine the memory requirements of the decompressor. The exact decom‐ pressor memory usage is slightly more than the LZMA2 dictionary size, but the val‐ ues in the table have been rounded up to the next full MiB."
            },
            {
                "flag": "-e",
                "long": "--extreme",
                "arg": null,
                "description": "Use a slower variant of the selected compression preset level (-0 ... -9) to hopefully get a little bit better compression ratio, but with bad luck this can also make it worse. Decompressor memory usage is not affected, but compressor memory usage in‐ creases a little at preset levels -0 ... -3. Since there are two presets with dictionary sizes 4 MiB and 8 MiB, the presets -3e and -5e use slightly faster settings (lower CompCPU) than -4e and -6e, respectively. That way no two presets are identical. Preset DictSize CompCPU CompMem DecMem -0e 256 KiB 8 4 MiB 1 MiB -1e 1 MiB 8 13 MiB 2 MiB -2e 2 MiB 8 25 MiB 3 MiB -3e 4 MiB 7 48 MiB 5 MiB -4e 4 MiB 8 48 MiB 5 MiB -5e 8 MiB 7 94 MiB 9 MiB -6e 8 MiB 8 94 MiB 9 MiB -7e 16 MiB 8 186 MiB 17 MiB -8e 32 MiB 8 370 MiB 33 MiB -9e 64 MiB 8 674 MiB 65 MiB For example, there are a total of four presets that use 8 MiB dictionary, whose order from the fastest to the slowest is -5, -6, -5e, and -6e."
            },
            {
                "flag": "",
                "long": "--fast",
                "arg": null,
                "description": "--best These are somewhat misleading aliases for -0 and -9, respectively. These are provided only for backwards compatibility with LZMA Utils. Avoid using these options. --block-size=size When compressing to the .xz format, split the input data into blocks of size bytes. The blocks are compressed independently from each other, which helps with multi- threading and makes limited random-access decompression possible. This option is typ‐ ically used to override the default block size in multi-threaded mode, but this option can be used in single-threaded mode too. In multi-threaded mode about three times size bytes will be allocated in each thread for buffering input and output. The default size is three times the LZMA2 dictionary size or 1 MiB, whichever is more. Typically a good value is 2-4 times the size of the LZMA2 dictionary or at least 1 MiB. Using size less than the LZMA2 dictionary size is waste of RAM because then the LZMA2 dictionary buffer will never get fully used. The sizes of the blocks are stored in the block headers, which a future version of xz will use for multi-threaded decompression. In single-threaded mode no block splitting is done by default. Setting this option doesn't affect memory usage. No size information is stored in block headers, thus files created in single-threaded mode won't be identical to files created in multi- threaded mode. The lack of size information also means that a future version of xz won't be able decompress the files in multi-threaded mode. --block-list=sizes When compressing to the .xz format, start a new block after the given intervals of un‐ compressed data. The uncompressed sizes of the blocks are specified as a comma-separated list. Omit‐ ting a size (two or more consecutive commas) is a shorthand to use the size of the previous block. If the input file is bigger than the sum of sizes, the last value in sizes is repeated until the end of the file. A special value of 0 may be used as the last value to in‐ dicate that the rest of the file should be encoded as a single block. If one specifies sizes that exceed the encoder's block size (either the default value in threaded mode or the value specified with --block-size=size), the encoder will cre‐ ate additional blocks while keeping the boundaries specified in sizes. For example, if one specifies --block-size=10MiB --block-list=5MiB,10MiB,8MiB,12MiB,24MiB and the input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB. In multi-threaded mode the sizes of the blocks are stored in the block headers. This isn't done in single-threaded mode, so the encoded output won't be identical to that of the multi-threaded mode. --flush-timeout=timeout When compressing, if more than timeout milliseconds (a positive integer) has passed since the previous flush and reading more input would block, all the pending input data is flushed from the encoder and made available in the output stream. This can be useful if xz is used to compress data that is streamed over a network. Small timeout values make the data available at the receiving end with a small delay, but large timeout values give better compression ratio. This feature is disabled by default. If this option is specified more than once, the last one takes effect. The special timeout value of 0 can be used to explicitly dis‐ able this feature. This feature is not available on non-POSIX systems. This feature is still experimental. Currently xz is unsuitable for decompressing the stream in real time due to how xz does buffering. --memlimit-compress=limit Set a memory usage limit for compression. If this option is specified multiple times, the last one takes effect. If the compression settings exceed the limit, xz will adjust the settings downwards so that the limit is no longer exceeded and display a notice that automatic adjustment was done. Such adjustments are not made when compressing with --format=raw or if --no-adjust has been specified. In those cases, an error is displayed and xz will exit with exit status 1. The limit can be specified in multiple ways: • The limit can be an absolute value in bytes. Using an integer suffix like MiB can be useful. Example: --memlimit-compress=80MiB • The limit can be specified as a percentage of total physical memory (RAM). This can be useful especially when setting the XZDEFAULTS environment variable in a shell initialization script that is shared between different computers. That way the limit is automatically bigger on systems with more memory. Example: --mem‐‐ limit-compress=70% • The limit can be reset back to its default value by setting it to 0. This is cur‐ rently equivalent to setting the limit to max (no memory usage limit). Once multi‐ threading support has been implemented, there may be a difference between 0 and max for the multithreaded case, so it is recommended to use 0 instead of max until the details have been decided. For 32-bit xz there is a special case: if the limit would be over 4020 MiB, the limit is set to 4020 MiB. (The values 0 and max aren't affected by this. A similar feature doesn't exist for decompression.) This can be helpful when a 32-bit executable has access to 4 GiB address space while hopefully doing no harm in other situations. See also the section Memory usage. --memlimit-decompress=limit Set a memory usage limit for decompression. This also affects the --list mode. If the operation is not possible without exceeding the limit, xz will display an error and decompressing the file will fail. See --memlimit-compress=limit for possible ways to specify the limit."
            },
            {
                "flag": "-M",
                "long": null,
                "arg": null,
                "description": "This is equivalent to specifying --memlimit-compress=limit --memlimit-decom‐‐ press=limit."
            },
            {
                "flag": "",
                "long": "--no-adjust",
                "arg": null,
                "description": "Display an error and exit if the compression settings exceed the memory usage limit. The default is to adjust the settings downwards so that the memory usage limit is not exceeded. Automatic adjusting is always disabled when creating raw streams (--for‐‐ mat=raw)."
            },
            {
                "flag": "-T",
                "long": null,
                "arg": null,
                "description": "Specify the number of worker threads to use. Setting threads to a special value 0 makes xz use as many threads as there are CPU cores on the system. The actual number of threads can be less than threads if the input file is not big enough for threading with the given settings or if using more threads would exceed the memory usage limit. Currently the only threading method is to split the input into blocks and compress them independently from each other. The default block size depends on the compression level and can be overridden with the --block-size=size option. Threaded decompression hasn't been implemented yet. It will only work on files that contain multiple blocks with size information in block headers. All files compressed in multi-threaded mode meet this condition, but files compressed in single-threaded mode don't even if --block-size=size is used."
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "Suppress warnings and notices. Specify this twice to suppress errors too. This op‐ tion has no effect on the exit status. That is, even if a warning was suppressed, the exit status to indicate a warning is still used."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Be verbose. If standard error is connected to a terminal, xz will display a progress indicator. Specifying --verbose twice will give even more verbose output. The progress indicator shows the following information: • Completion percentage is shown if the size of the input file is known. That is, the percentage cannot be shown in pipes. • Amount of compressed data produced (compressing) or consumed (decompressing). • Amount of uncompressed data consumed (compressing) or produced (decompressing). • Compression ratio, which is calculated by dividing the amount of compressed data processed so far by the amount of uncompressed data processed so far. • Compression or decompression speed. This is measured as the amount of uncompressed data consumed (compression) or produced (decompression) per second. It is shown after a few seconds have passed since xz started processing the file. • Elapsed time in the format M:SS or H:MM:SS. • Estimated remaining time is shown only when the size of the input file is known and a couple of seconds have already passed since xz started processing the file. The time is shown in a less precise format which never has any colons, for example, 2 min 30 s. When standard error is not a terminal, --verbose will make xz print the filename, com‐ pressed size, uncompressed size, compression ratio, and possibly also the speed and elapsed time on a single line to standard error after compressing or decompressing the file. The speed and elapsed time are included only when the operation took at least a few seconds. If the operation didn't finish, for example, due to user interruption, also the completion percentage is printed if the size of the input file is known."
            },
            {
                "flag": "-Q",
                "long": "--no-warn",
                "arg": null,
                "description": "Don't set the exit status to 2 even if a condition worth a warning was detected. This option doesn't affect the verbosity level, thus both --quiet and --no-warn have to be used to not display warnings and to not alter the exit status."
            },
            {
                "flag": "",
                "long": "--robot",
                "arg": null,
                "description": "Print messages in a machine-parsable format. This is intended to ease writing front‐ ends that want to use xz instead of liblzma, which may be the case with various scripts. The output with this option enabled is meant to be stable across xz re‐ leases. See the section ROBOT MODE for details."
            },
            {
                "flag": "",
                "long": "--info-memory",
                "arg": null,
                "description": "Display, in human-readable format, how much physical memory (RAM) xz thinks the system has and the memory usage limits for compression and decompression, and exit success‐ fully."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display a help message describing the most commonly used options, and exit success‐ fully."
            },
            {
                "flag": "-H",
                "long": "--long-help",
                "arg": null,
                "description": "Display a help message describing all features of xz, and exit successfully"
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display the version number of xz and liblzma in human readable format. To get ma‐ chine-parsable output, specify --robot before --version."
            }
        ],
        "examples": [
            "Compress the file foo into foo.xz using the default compression level (-6), and remove foo if",
            "compression is successful:",
            "xz foo",
            "Decompress bar.xz into bar and don't remove bar.xz even if decompression is successful:",
            "xz -dk bar.xz",
            "Create  baz.tar.xz  with  the preset -4e (-4 --extreme), which is slower than the default -6,",
            "but needs less memory for compression and decompression (48 MiB and 5 MiB, respectively):",
            "tar cf - baz | xz -4e > baz.tar.xz",
            "A mix of compressed and uncompressed files can be decompressed to standard output with a sin‐",
            "gle command:",
            "xz -dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt",
            "On GNU and *BSD, find(1) and xargs(1) can be used to parallelize compression of many files:",
            "find . -type f \\! -name '*.xz' -print0 \\",
            "| xargs -0r -P4 -n16 xz -T1",
            "The  -P  option to xargs(1) sets the number of parallel xz processes.  The best value for the",
            "of  files,  the value should probably be 1; with tens of thousands of files, 100 or even more",
            "may be appropriate to reduce the number of xz processes that xargs(1) will eventually create.",
            "The option -T1 for xz is there to force it to single-threaded mode, because xargs(1) is  used",
            "to control the amount of parallelization.",
            "Calculate how many bytes have been saved in total after compressing multiple files:",
            "xz --robot --list *.xz | awk '/^totals/{print $5-$4}'",
            "A  script may want to know that it is using new enough xz.  The following sh(1) script checks",
            "that the version number of the xz tool is at least 5.0.0.  This method is compatible with old",
            "beta versions, which didn't support the --robot option:",
            "if ! eval \"$(xz --robot --version 2> /dev/null)\" ||",
            "[ \"$XZVERSION\" -lt 50000002 ]; then",
            "echo \"Your xz is too old.\"",
            "fi",
            "unset XZVERSION LIBLZMAVERSION",
            "Set a memory usage limit for decompression using XZOPT, but if a limit has already been set,",
            "don't increase it:",
            "NEWLIM=$((123 << 20))  # 123 MiB",
            "OLDLIM=$(xz --robot --info-memory | cut -f3)",
            "if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then",
            "XZOPT=\"$XZOPT --memlimit-decompress=$NEWLIM\"",
            "export XZOPT",
            "fi",
            "The simplest use for custom filter chains is customizing a LZMA2 preset.  This can be useful,",
            "because the presets cover only a subset of the potentially useful combinations of compression",
            "settings.",
            "The CompCPU columns of the tables from the descriptions of the options -0 ...  -9  and  --ex‐‐",
            "treme  are useful when customizing LZMA2 presets.  Here are the relevant parts collected from",
            "those two tables:",
            "Preset   CompCPU",
            "-0         0",
            "-1         1",
            "-2         2",
            "-3         3",
            "-4         4",
            "-5         5",
            "-6         6",
            "-5e        7",
            "-6e        8",
            "If you know that a file requires somewhat big dictionary (for example,  32 MiB)  to  compress",
            "well,  but  you  want to compress it quicker than xz -8 would do, a preset with a low CompCPU",
            "value (for example, 1) can be modified to use a bigger dictionary:",
            "xz --lzma2=preset=1,dict=32MiB foo.tar",
            "With certain files, the above command may be faster than xz  -6  while  compressing  signifi‐",
            "cantly  better.   However, it must be emphasized that only some files benefit from a big dic‐",
            "tionary while keeping the CompCPU value low.  The most obvious situation, where a big dictio‐",
            "nary  can help a lot, is an archive containing very similar files of at least a few megabytes",
            "each.  The dictionary size has to be significantly bigger than any individual file  to  allow",
            "LZMA2 to take full advantage of the similarities between consecutive files.",
            "If  very high compressor and decompressor memory usage is fine, and the file being compressed",
            "is at least several hundred megabytes, it may be useful to use an even bigger dictionary than",
            "the 64 MiB that xz -9 would use:",
            "xz -vv --lzma2=dict=192MiB bigfoo.tar",
            "Using -vv (--verbose --verbose) like in the above example can be useful to see the memory re‐",
            "quirements of the compressor and decompressor.  Remember that using a dictionary bigger  than",
            "the  size  of the uncompressed file is waste of memory, so the above command isn't useful for",
            "small files.",
            "Sometimes the compression time doesn't matter, but the decompressor memory usage  has  to  be",
            "kept low, for example, to make it possible to decompress the file on an embedded system.  The",
            "following command uses -6e (-6 --extreme) as a base and sets the dictionary to  only  64 KiB.",
            "The  resulting  file can be decompressed with XZ Embedded (that's why there is --check=crc32)",
            "using about 100 KiB of memory.",
            "xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo",
            "If you want to squeeze out as many bytes as possible, adjusting the number of literal context",
            "bits  (lc) and number of position bits (pb) can sometimes help.  Adjusting the number of lit‐",
            "eral position bits (lp) might help too, but usually lc and pb are more important.  For  exam‐",
            "ple,  a  source  code  archive contains mostly US-ASCII text, so something like the following",
            "might give slightly (like 0.1 %) smaller file than xz -6e (try also without lc=4):",
            "xz --lzma2=preset=6e,pb=0,lc=4 sourcecode.tar",
            "Using another filter together with LZMA2 can improve compression  with  certain  file  types.",
            "For example, to compress a x86-32 or x86-64 shared library using the x86 BCJ filter:",
            "xz --x86 --lzma2 libfoo.so",
            "Note  that  the  order  of  the  filter  options is significant.  If --x86 is specified after",
            "--lzma2, xz will give an error, because there cannot be any filter after LZMA2, and also  be‐",
            "cause the x86 BCJ filter cannot be used as the last filter in the chain.",
            "The  Delta  filter  together  with LZMA2 can give good results with bitmap images.  It should",
            "usually beat PNG, which has a few more advanced filters than simple delta  but  uses  Deflate",
            "for the actual compression.",
            "The  image  has  to  be saved in uncompressed format, for example, as uncompressed TIFF.  The",
            "distance parameter of the Delta filter is set to match the number of bytes per pixel  in  the",
            "image.   For  example,  24-bit  RGB  bitmap needs dist=3, and it is also good to pass pb=0 to",
            "LZMA2 to accommodate the three-byte alignment:",
            "xz --delta=dist=3 --lzma2=pb=0 foo.tiff",
            "If multiple images have been put into a single archive (for example, .tar), the Delta  filter",
            "will work on that too as long as all images have the same number of bytes per pixel."
        ],
        "see_also": [
            {
                "name": "xzdec",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xzdec/1/json"
            },
            {
                "name": "xzdiff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xzdiff/1/json"
            },
            {
                "name": "xzgrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xzgrep/1/json"
            },
            {
                "name": "xzless",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xzless/1/json"
            },
            {
                "name": "xzmore",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xzmore/1/json"
            },
            {
                "name": "gzip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gzip/1/json"
            },
            {
                "name": "bzip2",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bzip2/1/json"
            },
            {
                "name": "7z",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/7z/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COMMAND ALIASES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 52,
                "subsections": [
                    {
                        "name": "Memory usage",
                        "lines": 29
                    },
                    {
                        "name": "Concatenation and padding with .xz files",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Integer suffixes and special values",
                        "lines": 15
                    },
                    {
                        "name": "Operation mode",
                        "lines": 2
                    },
                    {
                        "name": "-z --compress",
                        "lines": 4,
                        "flag": "-z",
                        "long": "--compress"
                    },
                    {
                        "name": "-d --decompress --uncompress",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--uncompress"
                    },
                    {
                        "name": "-t --test",
                        "lines": 4,
                        "flag": "-t",
                        "long": "--test"
                    },
                    {
                        "name": "-l --list",
                        "lines": 14,
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "Operation modifiers",
                        "lines": 1
                    },
                    {
                        "name": "-k --keep",
                        "lines": 7,
                        "flag": "-k",
                        "long": "--keep"
                    },
                    {
                        "name": "-f --force",
                        "lines": 15,
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-c --stdout --to-stdout",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--to-stdout"
                    },
                    {
                        "name": "--single-stream",
                        "lines": 9,
                        "long": "--single-stream"
                    },
                    {
                        "name": "--no-sparse",
                        "lines": 7,
                        "long": "--no-sparse"
                    },
                    {
                        "name": "-S --suffix=",
                        "lines": 23,
                        "flag": "-S"
                    },
                    {
                        "name": "Basic file format and compression options",
                        "lines": 1
                    },
                    {
                        "name": "-F --format=",
                        "lines": 18,
                        "flag": "-F"
                    },
                    {
                        "name": "-C --check=",
                        "lines": 21,
                        "flag": "-C"
                    },
                    {
                        "name": "--ignore-check",
                        "lines": 12,
                        "long": "--ignore-check"
                    },
                    {
                        "name": "-0 -9",
                        "lines": 68,
                        "flag": "-9"
                    },
                    {
                        "name": "-e --extreme",
                        "lines": 24,
                        "flag": "-e",
                        "long": "--extreme"
                    },
                    {
                        "name": "--fast",
                        "lines": 104,
                        "long": "--fast"
                    },
                    {
                        "name": "-M --memlimit= --memory=",
                        "lines": 3,
                        "flag": "-M"
                    },
                    {
                        "name": "--no-adjust",
                        "lines": 5,
                        "long": "--no-adjust"
                    },
                    {
                        "name": "-T --threads=",
                        "lines": 14,
                        "flag": "-T"
                    },
                    {
                        "name": "Custom compressor filter chains",
                        "lines": 262
                    },
                    {
                        "name": "Other options",
                        "lines": 1
                    },
                    {
                        "name": "-q --quiet",
                        "lines": 4,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 33,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-Q --no-warn",
                        "lines": 4,
                        "flag": "-Q",
                        "long": "--no-warn"
                    },
                    {
                        "name": "--robot",
                        "lines": 5,
                        "long": "--robot"
                    },
                    {
                        "name": "--info-memory",
                        "lines": 4,
                        "long": "--info-memory"
                    },
                    {
                        "name": "-h --help",
                        "lines": 3,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --long-help",
                        "lines": 2,
                        "flag": "-H",
                        "long": "--long-help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 3,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ROBOT MODE",
                "lines": 5,
                "subsections": [
                    {
                        "name": "Version",
                        "lines": 18
                    },
                    {
                        "name": "Memory limit information",
                        "lines": 13
                    },
                    {
                        "name": "List mode",
                        "lines": 16
                    },
                    {
                        "name": "summary",
                        "lines": 87
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "LZMA UTILS COMPATIBILITY",
                "lines": 5,
                "subsections": [
                    {
                        "name": "Compression preset levels",
                        "lines": 34
                    },
                    {
                        "name": "Streamed vs. non-streamed .lzma files",
                        "lines": 13
                    },
                    {
                        "name": "Unsupported .lzma files",
                        "lines": 15
                    },
                    {
                        "name": "Trailing garbage",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Compressed output may vary",
                        "lines": 11
                    },
                    {
                        "name": "Embedded .xz decompressors",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Basics",
                        "lines": 19
                    },
                    {
                        "name": "Parallel compression of many files",
                        "lines": 6
                    },
                    {
                        "name": "-n",
                        "lines": 6,
                        "flag": "-n"
                    },
                    {
                        "name": "Robot mode",
                        "lines": 24
                    },
                    {
                        "name": "Custom compressor filter chains",
                        "lines": 82
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}