{
    "content": [
        {
            "type": "text",
            "text": "# unzstd(1) (man)\n\n**Summary:** zstd - zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files\n\n**Synopsis:** zstd [OPTIONS] [-|INPUT-FILE] [-o OUTPUT-FILE]\nzstdmt is equivalent to zstd -T0\nunzstd is equivalent to zstd -d\nzstdcat is equivalent to zstd -dcf\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| — | — | — |  |\n| — | --train | — | Use FILEs as a training set to create a dictionary. The training set should contain a lot of small files (> 100). |\n| -l | --list | — | Display information related to a zstd compressed file, such as size, ratio, and check‐ sum. Some of these fields may not |\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (8 lines)\n- **DESCRIPTION** (39 lines) — 1 subsections\n  - Concatenation with .zst files (3 lines)\n- **OPTIONS** (1 lines) — 10 subsections\n  - Integer suffixes and special values (8 lines)\n  - Operation mode (2 lines)\n  - -z --compress (4 lines)\n  - -d --decompress --uncompress (2 lines)\n  - -t --test (4 lines)\n  - -b# (1 lines)\n  - --train FILEs (3 lines)\n  - -l --list (4 lines)\n  - Operation modifiers (156 lines)\n  - Restricted usage of Environment Variables (18 lines)\n- **DICTIONARY BUILDER** (6 lines) — 8 subsections\n  - --train FILEs (9 lines)\n  - -o file (2 lines)\n  - --maxdict=# (6 lines)\n  - -B# (1 lines)\n  - --dictID=# (7 lines)\n  - --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]] (35 lines)\n  - --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#] (17 lines)\n  - --train-legacy[=selectivity=#] (11 lines)\n- **BENCHMARK** (1 lines) — 5 subsections\n  - -b# (1 lines)\n  - -e# -b# -e# (1 lines)\n  - -i# (1 lines)\n  - -B# --block-size=# (2 lines)\n  - --priority=rt (10 lines)\n- **ADVANCED COMPRESSION OPTIONS** (1 lines) — 3 subsections\n  - --zstd[=options]: (122 lines)\n  - Example (5 lines)\n  - -B#: (6 lines)\n- **BUGS** (2 lines)\n- **AUTHOR** (5 lines)\n\n## Full Content\n\n### NAME\n\nzstd - zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files\n\n### SYNOPSIS\n\nzstd [OPTIONS] [-|INPUT-FILE] [-o OUTPUT-FILE]\n\nzstdmt is equivalent to zstd -T0\n\nunzstd is equivalent to zstd -d\n\nzstdcat is equivalent to zstd -dcf\n\n### DESCRIPTION\n\nzstd  is  a  fast lossless compression algorithm and data compression tool, with command line\nsyntax similar to gzip (1) and xz (1). It is based on the LZ77 family,  with  further  FSE  &\nhuff0 entropy stages. zstd offers highly configurable compression speed, with fast modes at >\n200 MB/s per core, and strong modes nearing lzma compression ratios. It also features a  very\nfast decoder, with speeds > 500 MB/s per core.\n\nzstd command line syntax is generally similar to gzip, but features the following differences\n:\n\n•   Source files are preserved by default. It´s possible to remove them automatically by  us‐\ning the --rm command.\n\n•   When  compressing  a single file, zstd displays progress notifications and result summary\nby default. Use -q to turn them off.\n\n•   zstd does not accept input from console, but it properly accepts stdin when it´s not  the\nconsole.\n\n•   zstd displays a short help page when command line is an error. Use -q to turn it off.\n\n\n\nzstd  compresses  or  decompresses  each file according to the selected operation mode. If no\nfiles are given or file is -, zstd reads from standard input and writes the processed data to\nstandard output. zstd will refuse to write compressed data to standard output if it is a ter‐\nminal : it will display an error message and skip the file. Similarly, zstd  will  refuse  to\nread compressed data from standard input if it is a terminal.\n\nUnless  --stdout  or  -o  is specified, files are written to a new file whose name is derived\nfrom the source file name:\n\n•   When compressing, the suffix .zst is appended to the source filename to  get  the  target\nfilename.\n\n•   When decompressing, the .zst suffix is removed from the source filename to get the target\nfilename\n\n#### Concatenation with .zst files\n\nIt is possible to concatenate .zst files as is. zstd will decompress such files  as  if  they\nwere a single .zst file.\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, and KB are accepted as synonyms for KiB.\n\nMiB    Multiply the integer by 1,048,576 (2^20). Mi, M, and MB are accepted as  synonyms  for\nMiB.\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, unzstd\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#### -b#\n\n#### --train FILEs\n\nUse  FILEs as a training set to create a dictionary. The training set should contain a\nlot of small files (> 100).\n\n#### -l --list\n\nDisplay information related to a zstd compressed file, such as size, ratio, and check‐\nsum. Some of these fields may not be available. This command can be augmented with the\n-v modifier.\n\n#### Operation modifiers\n\n•   -#: # compression level [1-19] (default: 3)\n\n•   --ultra: unlocks high compression levels 20+ (maximum 22), using a lot more memory.  Note\nthat decompression will also require more memory when using these levels.\n\n•   --fast[=#]: switch to ultra-fast compression levels. If =# is not present, it defaults to\n1. The higher the value, the faster the compression speed, at the cost of  some  compres‐\nsion  ratio.  This  setting overwrites compression level if one was set previously. Simi‐\nlarly, if a compression level is set after --fast, it overrides it.\n\n•   -T#, --threads=#: Compress using # working threads (default: 1). If # is  0,  attempt  to\ndetect  and  use  the  number  of  physical CPU cores. In all cases, the nb of threads is\ncapped to ZSTDMTNBWORKERSMAX==200. This modifier does nothing if zstd is compiled with‐\nout multithread support.\n\n•   --single-thread:  Does  not  spawn a thread for compression, use a single thread for both\nI/O and compression. In this mode, compression is serialized with I/O, which is  slightly\nslower.  (This  is  different  from -T1, which spawns 1 compression thread in parallel of\nI/O). This mode is the only one available when  multithread  support  is  disabled.  Sin‐\ngle-thread  mode features lower memory usage. Final compressed result is slightly differ‐\nent from -T1.\n\n•   --adapt[=min=#,max=#] : zstd will dynamically adapt compression level  to  perceived  I/O\nconditions.  Compression level adaptation can be observed live by using command -v. Adap‐\ntation can be constrained between supplied min and max levels.  The  feature  works  when\ncombined  with multi-threading and --long mode. It does not work with --single-thread. It\nsets window size to 8 MB by default (can be changed  manually,  see  wlog).  Due  to  the\nchaotic  nature  of  dynamic adaptation, compressed result is not reproducible. note : at\nthe time of this writing, --adapt can remain stuck at low speed when combined with multi‐\nple worker threads (>=2).\n\n•   --long[=#]:  enables  long distance matching with # windowLog, if not # is not present it\ndefaults to 27. This increases the window size (windowLog) and memory usage for both  the\ncompressor  and  decompressor.  This setting is designed to improve the compression ratio\nfor files with long matches at a large distance.\n\nNote: If windowLog is set to larger  than  27,  --long=windowLog  or  --memory=windowSize\nneeds to be passed to the decompressor.\n\n•   -D DICT: use DICT as Dictionary to compress or decompress FILE(s)\n\n•   --patch-from  FILE:  Specify the file to be used as a reference point for zstd´s diff en‐\ngine. This is effectively dictionary compression with some  convenient  parameter  selec‐\ntion, namely that windowSize > srcSize.\n\nNote:  cannot use both this and -D together Note: --long mode will be automatically acti‐\nvated if chainLog < fileLog (fileLog being the windowLog  required  to  cover  the  whole\nfile).  You can also manually force it. Node: for all levels, you can use --patch-from in\n--single-thread mode to improve compression ratio at the cost of speed  Note:  for  level\n19,  you  can  get  increased  compression  ratio  at  the  cost  of  speed by specifying\n--zstd=targetLength=  to  be  something  large  (i.e  4096),  and  by  setting  a   large\n--zstd=chainLog=\n\n•   --rsyncable  :  zstd will periodically synchronize the compression state to make the com‐\npressed file more rsync-friendly. There is a negligible impact to compression ratio,  and\nthe  faster  compression levels will see a small compression speed hit. This feature does\nnot work with --single-thread. You probably don´t want to use it with  long  range  mode,\nsince  it  will decrease the effectiveness of the synchronization points, but your milage\nmay vary.\n\n•   -C, --[no-]check: add integrity check computed from uncompressed data (default: enabled)\n\n•   --[no-]content-size: enable / disable whether or not the original size  of  the  file  is\nplaced  in the header of the compressed file. The default option is --content-size (mean‐\ning that the original size will be placed in the header).\n\n•   --no-dictID: do not store dictionary ID within frame header (dictionary compression). The\ndecoder  will  have to rely on implicit knowledge about which dictionary to use, it won´t\nbe able to check if it´s correct.\n\n•   -M#, --memory=#: Set a memory usage limit. By default, Zstandard uses 128 MB  for  decom‐\npression  as the maximum amount of memory the decompressor is allowed to use, but you can\noverride this manually if need be in either direction (ie. you can increase  or  decrease\nit).\n\nThis  is  also  used during compression when using with --patch-from=. In this case, this\nparameter overrides that maximum size allowed for a dictionary. (128 MB).\n\n•   --stream-size=# : Sets the pledged source size of input coming from a stream. This  value\nmust  be  exact,  as  it  will be included in the produced frame header. Incorrect stream\nsizes will cause an error. This information will be used to better  optimize  compression\nparameters,  resulting  in  better  and  potentially  faster  compression, especially for\nsmaller source sizes.\n\n•   --size-hint=#: When handling input from a stream, zstd must guess how  large  the  source\nsize  will  be  when  optimizing compression parameters. If the stream size is relatively\nsmall, this guess may be a poor one, resulting in a higher  compression  ratio  than  ex‐\npected.  This  feature allows for controlling the guess when needed. Exact guesses result\nin better compression ratios. Overestimates result in slightly degraded  compression  ra‐\ntios, while underestimates may result in significant degradation.\n\n•   -o FILE: save result into FILE\n\n•   -f, --force: overwrite output without prompting, and (de)compress symbolic links\n\n•   -c, --stdout: force write to standard output, even if it is the console\n\n•   --[no-]sparse: enable / disable sparse FS support, to make files with many zeroes smaller\non disk. Creating sparse files may save disk space and speed up decompression by reducing\nthe  amount  of  disk I/O. default: enabled when output is into a file, and disabled when\noutput is stdout. This setting overrides default and can force sparse mode over stdout.\n\n•   --rm: remove source file(s) after successful compression or  decompression.  If  used  in\ncombination  with -o, will trigger a confirmation prompt (which can be silenced with -f),\nas this is a destructive operation.\n\n•   -k, --keep: keep source file(s) after successful compression or  decompression.  This  is\nthe default behavior.\n\n•   -r: operate recursively on directories\n\n•   --filelist  FILE read a list of files to process as content from FILE. Format is compati‐\nble with ls output, with one file per line.\n\n•   --output-dir-flat DIR: resulting files are stored into target DIR directory,  instead  of\nsame  directory  as  origin file. Be aware that this command can introduce name collision\nissues, if multiple files, from different directories, end up having the same name.  Col‐\nlision  resolution  ensures first file with a given name will be present in DIR, while in\ncombination with -f, the last file will be present instead.\n\n•   --output-dir-mirror DIR: similar to --output-dir-flat, the output files are stored under‐\nneath target DIR directory, but this option will replicate input directory hierarchy into\noutput DIR.\n\nIf input directory contains \"..\", the files in this directory will be ignored.  If  input\ndirectory  is  an  absolute  directory  (i.e. \"/var/tmp/abc\"), it will be stored into the\n\"output-dir/var/tmp/abc\". If there are multiple input files or directories,  name  colli‐\nsion resolution will follow the same rules as --output-dir-flat.\n\n•   --format=FORMAT: compress and decompress in other formats. If compiled with support, zstd\ncan compress to or decompress from other compression algorithm formats.  Possibly  avail‐\nable  options  are  zstd, gzip, xz, lzma, and lz4. If no such format is provided, zstd is\nthe default.\n\n•   -h/-H, --help: display help/long help and exit\n\n•   -V, --version: display version number and exit. Advanced : -vV  also  displays  supported\nformats. -vvV also displays POSIX support. -q will only display the version number, suit‐\nable for machine reading.\n\n•   -v, --verbose: verbose mode, display more information\n\n•   -q, --quiet: suppress warnings, interactivity, and notifications. specify twice  to  sup‐\npress errors too.\n\n•   --no-progress: do not display the progress bar, but keep all other messages.\n\n•   --show-default-cparams:  Shows the default compression parameters that will be used for a\nparticular src file. If the provided src file is not a regular file (eg. named pipe), the\ncli  will  just output the default parameters. That is, the parameters that are used when\nthe src size is unknown.\n\n•   --: All arguments after -- are treated as files\n\n#### Restricted usage of Environment Variables\n\nUsing environment variables to set parameters has security implications. Therefore, this  av‐\nenue  is  intentionally  restricted.  Only  ZSTDCLEVEL and ZSTDNBTHREADS are currently sup‐\nported. They set the compression level and number of threads to use during  compression,  re‐\nspectively.\n\nZSTDCLEVEL  can be used to set the level between 1 and 19 (the \"normal\" range). If the value\nof ZSTDCLEVEL is not a valid integer, it will be ignored with a warning message. ZSTDCLEVEL\njust replaces the default compression level (3).\n\nZSTDNBTHREADS  can be used to set the number of threads zstd will attempt to use during com‐\npression. If the value of ZSTDNBTHREADS is not a valid unsigned integer, it will be  ignored\nwith  a  warning  message.  ´ZSTDNBTHREADShas  a default value of (1), and is capped at ZST‐‐\nDMTNBWORKERSMAX==200.zstd` must be compiled with multithread support for this to  have  any\neffect.\n\nThey can both be overridden by corresponding command line arguments: -# for compression level\nand -T# for number of compression threads.\n\n### DICTIONARY BUILDER\n\nzstd offers dictionary compression, which greatly improves efficiency on small files and mes‐\nsages. It´s possible to train zstd with a set of samples, the result of which is saved into a\nfile called a dictionary. Then during compression and decompression, reference the same  dic‐\ntionary,  using command -D dictionaryFileName. Compression of small files similar to the sam‐\nple set will be greatly improved.\n\n#### --train FILEs\n\nUse FILEs as training set to create a dictionary. The training set  should  contain  a\nlot  of small files (> 100), and weight typically 100x the target dictionary size (for\nexample, 10 MB for a 100 KB dictionary).\n\nSupports multithreading if zstd is compiled with threading support. Additional parame‐\nters can be specified with --train-fastcover. The legacy dictionary builder can be ac‐\ncessed with  --train-legacy.  The  cover  dictionary  builder  can  be  accessed  with\n--train-cover. Equivalent to --train-fastcover=d=8,steps=4.\n\n#### -o file\n\nDictionary saved into file (default name: dictionary).\n\n#### --maxdict=#\n\nLimit dictionary to specified size (default: 112640).\n\n-#     Use  #  compression  level  during  training (optional). Will generate statistics more\ntuned for selected compression level, resulting in a small compression ratio  improve‐\nment for this level.\n\n#### -B#\n\n#### --dictID=#\n\nA  dictionary  ID  is a locally unique ID that a decoder can use to verify it is using\nthe right dictionary. By default, zstd will create a 4-bytes random  number  ID.  It´s\npossible  to  give a precise number instead. Short numbers have an advantage : an ID <\n256 will only need 1 byte in the compressed frame header, and an ID < 65536 will  only\nneed 2 bytes. This compares favorably to 4 bytes default. However, it´s up to the dic‐\ntionary manager to not assign twice the same ID to 2 different dictionaries.\n\n#### --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]\n\nSelect parameters for the default dictionary builder algorithm named cover.  If  d  is\nnot  specified,  then  it  tries d = 6 and d = 8. If k is not specified, then it tries\nsteps values in the range [50, 2000]. If steps is  not  specified,  then  the  default\nvalue  of  40 is used. If split is not specified or split <= 0, then the default value\nof 100 is used. Requires that d <= k. If shrink flag is not  used,  then  the  default\nvalue  for shrinkDict of 0 is used. If shrink is not specified, then the default value\nfor shrinkDictMaxRegression of 1 is used.\n\nSelects segments of size k with highest score to put in the dictionary. The score of a\nsegment  is  computed  by the sum of the frequencies of all the subsegments of size d.\nGenerally d should be in the range [6, 8], occasionally up to 16,  but  the  algorithm\nwill  run  faster  with d <= 8. Good values for k vary widely based on the input data,\nbut a safe range is [2 * d, 2000]. If split is 100, all input  samples  are  used  for\nboth training and testing to find optimal d and k to build dictionary. Supports multi‐\nthreading if zstd is compiled with threading support. Having shrink  enabled  takes  a\ntruncated  dictionary  of  minimum size and doubles in size until compression ratio of\nthe truncated dictionary is at most shrinkDictMaxRegression% worse than  the  compres‐\nsion ratio of the largest dictionary.\n\nExamples:\n\nzstd --train-cover FILEs\n\nzstd --train-cover=k=50,d=8 FILEs\n\nzstd --train-cover=d=8,steps=500 FILEs\n\nzstd --train-cover=k=50 FILEs\n\nzstd --train-cover=k=50,split=60 FILEs\n\nzstd --train-cover=shrink FILEs\n\nzstd --train-cover=shrink=2 FILEs\n\n#### --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]\n\nSame  as  cover  but  with extra parameters f and accel and different default value of\nsplit If split is not specified, then it tries split = 75. If f is not specified, then\nit  tries  f  = 20. Requires that 0 < f < 32. If accel is not specified, then it tries\naccel = 1. Requires that 0 < accel <= 10. Requires that d = 6 or d = 8.\n\nf is log of size of array that keeps track of frequency of subsegments of size d.  The\nsubsegment  is hashed to an index in the range [0,2^f - 1]. It is possible that 2 dif‐\nferent subsegments are hashed to the same index, and they are considered as  the  same\nsubsegment  when  computing  frequency.  Using  a higher f reduces collision but takes\nlonger.\n\nExamples:\n\nzstd --train-fastcover FILEs\n\nzstd --train-fastcover=d=8,f=15,accel=2 FILEs\n\n#### --train-legacy[=selectivity=#]\n\nUse legacy dictionary builder algorithm with the  given  dictionary  selectivity  (de‐\nfault: 9). The smaller the selectivity value, the denser the dictionary, improving its\nefficiency but reducing its possible maximum  size.  --train-legacy=s=#  is  also  ac‐\ncepted.\n\nExamples:\n\nzstd --train-legacy FILEs\n\nzstd --train-legacy=selectivity=8 FILEs\n\n### BENCHMARK\n\n#### -b#\n\n#### -e# -b# -e#\n\n#### -i#\n\n#### -B# --block-size=#\n\ncut file(s) into independent blocks of size # (default: no block)\n\n#### --priority=rt\n\nset process priority to real-time\n\nOutput  Format: CompressionLevel#Filename : IntputSize -> OutputSize (CompressionRatio), Com‐\npressionSpeed, DecompressionSpeed\n\nMethodology: For both compression and decompression speed, the entire input is compressed/de‐\ncompressed  in-memory  to measure speed. A run lasts at least 1 sec, so when files are small,\nthey are compressed/decompressed several times per run, in order to improve measurement accu‐\nracy.\n\n### ADVANCED COMPRESSION OPTIONS\n\n#### --zstd[=options]:\n\nzstd  provides  22 predefined compression levels. The selected or default predefined compres‐\nsion level can be changed with advanced compression options. The options are  provided  as  a\ncomma-separated  list.  You may specify only the options you want to change and the rest will\nbe taken from the selected or default compression level. The list of available options:\n\nstrategy=strat, strat=strat\nSpecify a strategy used by a match finder.\n\nThere are 9 strategies numbered from 1 to 9, from  faster  to  stronger:  1=ZSTDfast,\n2=ZSTDdfast,  3=ZSTDgreedy, 4=ZSTDlazy, 5=ZSTDlazy2, 6=ZSTDbtlazy2, 7=ZSTDbtopt,\n8=ZSTDbtultra, 9=ZSTDbtultra2.\n\nwindowLog=wlog, wlog=wlog\nSpecify the maximum number of bits for a match distance.\n\nThe higher number of increases the chance to find a match which usually improves  com‐\npression  ratio.  It  also increases memory requirements for the compressor and decom‐\npressor. The minimum wlog is 10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit  plat‐\nforms and 31 (2 GiB) on 64-bit platforms.\n\nNote:  If  windowLog is set to larger than 27, --long=windowLog or --memory=windowSize\nneeds to be passed to the decompressor.\n\nhashLog=hlog, hlog=hlog\nSpecify the maximum number of bits for a hash table.\n\nBigger hash tables cause less collisions which usually makes compression  faster,  but\nrequires more memory during compression.\n\nThe minimum hlog is 6 (64 B) and the maximum is 30 (1 GiB).\n\nchainLog=clog, clog=clog\nSpecify the maximum number of bits for a hash chain or a binary tree.\n\nHigher  numbers  of  bits  increases the chance to find a match which usually improves\ncompression ratio. It also slows down compression speed and increases memory  require‐\nments for compression. This option is ignored for the ZSTDfast strategy.\n\nThe  minimum  clog is 6 (64 B) and the maximum is 29 (524 Mib) on 32-bit platforms and\n30 (1 Gib) on 64-bit platforms.\n\nsearchLog=slog, slog=slog\nSpecify the maximum number of searches in a hash chain or a binary  tree  using  loga‐\nrithmic scale.\n\nMore searches increases the chance to find a match which usually increases compression\nratio but decreases compression speed.\n\nThe minimum slog is 1 and the maximum is ´windowLog´ - 1.\n\nminMatch=mml, mml=mml\nSpecify the minimum searched length of a match in a hash table.\n\nLarger search lengths usually decrease compression  ratio  but  improve  decompression\nspeed.\n\nThe minimum mml is 3 and the maximum is 7.\n\ntargetLength=tlen, tlen=tlen\nThe impact of this field vary depending on selected strategy.\n\nFor  ZSTDbtopt, ZSTDbtultra and ZSTDbtultra2, it specifies the minimum match length\nthat causes match finder to stop searching. A  larger  targetLength  usually  improves\ncompression  ratio  but  decreases compression speed. t For ZSTDfast, it triggers ul‐\ntra-fast mode when > 0. The value represents the amount of data skipped between  match\nsampling.  Impact  is reversed : a larger targetLength increases compression speed but\ndecreases compression ratio.\n\nFor all other strategies, this field has no impact.\n\nThe minimum tlen is 0 and the maximum is 128 Kib.\n\noverlapLog=ovlog, ovlog=ovlog\nDetermine overlapSize, amount of data reloaded from previous job.  This  parameter  is\nonly  available  when multithreading is enabled. Reloading more data improves compres‐\nsion ratio, but decreases speed.\n\nThe minimum ovlog is 0, and the maximum is 9. 1 means \"no overlap\",  hence  completely\nindependent  jobs.  9  means \"full overlap\", meaning up to windowSize is reloaded from\nprevious job. Reducing ovlog by 1 reduces the reloaded amount by a factor 2. For exam‐\nple,  8 means \"windowSize/2\", and 6 means \"windowSize/8\". Value 0 is special and means\n\"default\" : ovlog is automatically determined by zstd. In which case, ovlog will range\nfrom 6 to 9, depending on selected strat.\n\nldmHashLog=lhlog, lhlog=lhlog\nSpecify the maximum size for a hash table used for long distance matching.\n\nThis option is ignored unless long distance matching is enabled.\n\nBigger  hash  tables  usually  improve compression ratio at the expense of more memory\nduring compression and a decrease in compression speed.\n\nThe minimum lhlog is 6 and the maximum is 30 (default: 20).\n\nldmMinMatch=lmml, lmml=lmml\nSpecify the minimum searched length of a match for long distance matching.\n\nThis option is ignored unless long distance matching is enabled.\n\nLarger/very small values usually decrease compression ratio.\n\nThe minimum lmml is 4 and the maximum is 4096 (default: 64).\n\nldmBucketSizeLog=lblog, lblog=lblog\nSpecify the size of each bucket for the hash table used for long distance matching.\n\nThis option is ignored unless long distance matching is enabled.\n\nLarger bucket sizes improve collision resolution but decrease compression speed.\n\nThe minimum lblog is 1 and the maximum is 8 (default: 3).\n\nldmHashRateLog=lhrlog, lhrlog=lhrlog\nSpecify the frequency of inserting entries into the long distance matching hash table.\n\nThis option is ignored unless long distance matching is enabled.\n\nLarger values will improve compression speed. Deviating far  from  the  default  value\nwill likely result in a decrease in compression ratio.\n\nThe default value is wlog - lhlog.\n\n#### Example\n\nThe following parameters sets advanced compression options to something similar to predefined\nlevel 19 for files bigger than 256 KB:\n\n--zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6\n\n#### -B#:\n\nSelect the size of each compression job. This parameter is available only when  multi-thread‐\ning  is enabled. Default value is 4 * windowSize, which means it varies depending on compres‐\nsion level. -B# makes it possible to select a custom value. Note that job size must respect a\nminimum  value  which is enforced transparently. This minimum is either 1 MB, or overlapSize,\nwhichever is largest.\n\n### BUGS\n\nReport bugs at: https://github.com/facebook/zstd/issues\n\n### AUTHOR\n\nYann Collet\n\n\n\nzstd 1.4.8                                  December 2020                                    ZSTD(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "unzstd",
        "section": "1",
        "mode": "man",
        "summary": "zstd - zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files",
        "synopsis": "zstd [OPTIONS] [-|INPUT-FILE] [-o OUTPUT-FILE]\nzstdmt is equivalent to zstd -T0\nunzstd is equivalent to zstd -d\nzstdcat is equivalent to zstd -dcf",
        "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, unzstd 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": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--train",
                "arg": null,
                "description": "Use FILEs as a training set to create a dictionary. The training set should contain a lot of small files (> 100)."
            },
            {
                "flag": "-l",
                "long": "--list",
                "arg": null,
                "description": "Display information related to a zstd compressed file, such as size, ratio, and check‐ sum. Some of these fields may not be available. This command can be augmented with the -v modifier."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 39,
                "subsections": [
                    {
                        "name": "Concatenation with .zst files",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Integer suffixes and special values",
                        "lines": 8
                    },
                    {
                        "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": "-b#",
                        "lines": 1
                    },
                    {
                        "name": "--train FILEs",
                        "lines": 3,
                        "long": "--train"
                    },
                    {
                        "name": "-l --list",
                        "lines": 4,
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "Operation modifiers",
                        "lines": 156
                    },
                    {
                        "name": "Restricted usage of Environment Variables",
                        "lines": 18
                    }
                ]
            },
            {
                "name": "DICTIONARY BUILDER",
                "lines": 6,
                "subsections": [
                    {
                        "name": "--train FILEs",
                        "lines": 9,
                        "long": "--train"
                    },
                    {
                        "name": "-o file",
                        "lines": 2,
                        "flag": "-o"
                    },
                    {
                        "name": "--maxdict=#",
                        "lines": 6,
                        "long": "--maxdict",
                        "arg": "#"
                    },
                    {
                        "name": "-B#",
                        "lines": 1
                    },
                    {
                        "name": "--dictID=#",
                        "lines": 7,
                        "long": "--dictID",
                        "arg": "#"
                    },
                    {
                        "name": "--train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]",
                        "lines": 35
                    },
                    {
                        "name": "--train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]",
                        "lines": 17
                    },
                    {
                        "name": "--train-legacy[=selectivity=#]",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "BENCHMARK",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-b#",
                        "lines": 1
                    },
                    {
                        "name": "-e# -b# -e#",
                        "lines": 1
                    },
                    {
                        "name": "-i#",
                        "lines": 1
                    },
                    {
                        "name": "-B# --block-size=#",
                        "lines": 2,
                        "long": "--block-size",
                        "arg": "#"
                    },
                    {
                        "name": "--priority=rt",
                        "lines": 10,
                        "long": "--priority",
                        "arg": "rt"
                    }
                ]
            },
            {
                "name": "ADVANCED COMPRESSION OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--zstd[=options]:",
                        "lines": 122
                    },
                    {
                        "name": "Example",
                        "lines": 5
                    },
                    {
                        "name": "-B#:",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}