1zstd(1) -- zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files 2============================================================================ 3 4SYNOPSIS 5-------- 6 7`zstd` [*OPTIONS*] [-|_INPUT-FILE_] [-o _OUTPUT-FILE_] 8 9`zstdmt` is equivalent to `zstd -T0` 10 11`unzstd` is equivalent to `zstd -d` 12 13`zstdcat` is equivalent to `zstd -dcf` 14 15 16DESCRIPTION 17----------- 18`zstd` is a fast lossless compression algorithm and data compression tool, 19with command line syntax similar to `gzip (1)` and `xz (1)`. 20It is based on the **LZ77** family, with further FSE & huff0 entropy stages. 21`zstd` offers highly configurable compression speed, 22with fast modes at > 200 MB/s per core, 23and strong modes nearing lzma compression ratios. 24It also features a very fast decoder, with speeds > 500 MB/s per core. 25 26`zstd` command line syntax is generally similar to gzip, 27but features the following differences : 28 29 - Source files are preserved by default. 30 It's possible to remove them automatically by using the `--rm` command. 31 - When compressing a single file, `zstd` displays progress notifications 32 and result summary by default. 33 Use `-q` to turn them off. 34 - `zstd` does not accept input from console, 35 but it properly accepts `stdin` when it's not the console. 36 - `zstd` displays a short help page when command line is an error. 37 Use `-q` to turn it off. 38 39`zstd` compresses or decompresses each _file_ according to the selected 40operation mode. 41If no _files_ are given or _file_ is `-`, `zstd` reads from standard input 42and writes the processed data to standard output. 43`zstd` will refuse to write compressed data to standard output 44if it is a terminal : it will display an error message and skip the _file_. 45Similarly, `zstd` will refuse to read compressed data from standard input 46if it is a terminal. 47 48Unless `--stdout` or `-o` is specified, _files_ are written to a new file 49whose name is derived from the source _file_ name: 50 51* When compressing, the suffix `.zst` is appended to the source filename to 52 get the target filename. 53* When decompressing, the `.zst` suffix is removed from the source filename to 54 get the target filename 55 56### Concatenation with .zst files 57It is possible to concatenate `.zst` files as is. 58`zstd` will decompress such files as if they were a single `.zst` file. 59 60OPTIONS 61------- 62 63### Integer suffixes and special values 64In most places where an integer argument is expected, 65an optional suffix is supported to easily indicate large integers. 66There must be no space between the integer and the suffix. 67 68* `KiB`: 69 Multiply the integer by 1,024 (2\^10). 70 `Ki`, `K`, and `KB` are accepted as synonyms for `KiB`. 71* `MiB`: 72 Multiply the integer by 1,048,576 (2\^20). 73 `Mi`, `M`, and `MB` are accepted as synonyms for `MiB`. 74 75### Operation mode 76If multiple operation mode options are given, 77the last one takes effect. 78 79* `-z`, `--compress`: 80 Compress. 81 This is the default operation mode when no operation mode option is specified 82 and no other operation mode is implied from the command name 83 (for example, `unzstd` implies `--decompress`). 84* `-d`, `--decompress`, `--uncompress`: 85 Decompress. 86* `-t`, `--test`: 87 Test the integrity of compressed _files_. 88 This option is equivalent to `--decompress --stdout` except that the 89 decompressed data is discarded instead of being written to standard output. 90 No files are created or removed. 91* `-b#`: 92 Benchmark file(s) using compression level # 93* `--train FILEs`: 94 Use FILEs as a training set to create a dictionary. 95 The training set should contain a lot of small files (> 100). 96* `-l`, `--list`: 97 Display information related to a zstd compressed file, such as size, ratio, and checksum. 98 Some of these fields may not be available. 99 This command can be augmented with the `-v` modifier. 100 101### Operation modifiers 102 103* `-#`: 104 `#` compression level \[1-19] (default: 3) 105* `--ultra`: 106 unlocks high compression levels 20+ (maximum 22), using a lot more memory. 107 Note that decompression will also require more memory when using these levels. 108* `--fast[=#]`: 109 switch to ultra-fast compression levels. 110 If `=#` is not present, it defaults to `1`. 111 The higher the value, the faster the compression speed, 112 at the cost of some compression ratio. 113 This setting overwrites compression level if one was set previously. 114 Similarly, if a compression level is set after `--fast`, it overrides it. 115* `-T#`, `--threads=#`: 116 Compress using `#` working threads (default: 1). 117 If `#` is 0, attempt to detect and use the number of physical CPU cores. 118 In all cases, the nb of threads is capped to `ZSTDMT_NBWORKERS_MAX`, 119 which is either 64 in 32-bit mode, or 256 for 64-bit environments. 120 This modifier does nothing if `zstd` is compiled without multithread support. 121* `--single-thread`: 122 Does not spawn a thread for compression, use a single thread for both I/O and compression. 123 In this mode, compression is serialized with I/O, which is slightly slower. 124 (This is different from `-T1`, which spawns 1 compression thread in parallel of I/O). 125 This mode is the only one available when multithread support is disabled. 126 Single-thread mode features lower memory usage. 127 Final compressed result is slightly different from `-T1`. 128* `--auto-threads={physical,logical} (default: physical)`: 129 When using a default amount of threads via `-T0`, choose the default based on the number 130 of detected physical or logical cores. 131* `--adapt[=min=#,max=#]` : 132 `zstd` will dynamically adapt compression level to perceived I/O conditions. 133 Compression level adaptation can be observed live by using command `-v`. 134 Adaptation can be constrained between supplied `min` and `max` levels. 135 The feature works when combined with multi-threading and `--long` mode. 136 It does not work with `--single-thread`. 137 It sets window size to 8 MB by default (can be changed manually, see `wlog`). 138 Due to the chaotic nature of dynamic adaptation, compressed result is not reproducible. 139 _note_ : at the time of this writing, `--adapt` can remain stuck at low speed 140 when combined with multiple worker threads (>=2). 141* `--long[=#]`: 142 enables long distance matching with `#` `windowLog`, if not `#` is not 143 present it defaults to `27`. 144 This increases the window size (`windowLog`) and memory usage for both the 145 compressor and decompressor. 146 This setting is designed to improve the compression ratio for files with 147 long matches at a large distance. 148 149 Note: If `windowLog` is set to larger than 27, `--long=windowLog` or 150 `--memory=windowSize` needs to be passed to the decompressor. 151* `-D DICT`: 152 use `DICT` as Dictionary to compress or decompress FILE(s) 153* `--patch-from FILE`: 154 Specify the file to be used as a reference point for zstd's diff engine. 155 This is effectively dictionary compression with some convenient parameter 156 selection, namely that windowSize > srcSize. 157 158 Note: cannot use both this and -D together 159 Note: `--long` mode will be automatically activated if chainLog < fileLog 160 (fileLog being the windowLog required to cover the whole file). You 161 can also manually force it. 162 Node: for all levels, you can use --patch-from in --single-thread mode 163 to improve compression ratio at the cost of speed 164 Note: for level 19, you can get increased compression ratio at the cost 165 of speed by specifying `--zstd=targetLength=` to be something large 166 (i.e 4096), and by setting a large `--zstd=chainLog=` 167* `--rsyncable` : 168 `zstd` will periodically synchronize the compression state to make the 169 compressed file more rsync-friendly. There is a negligible impact to 170 compression ratio, and the faster compression levels will see a small 171 compression speed hit. 172 This feature does not work with `--single-thread`. You probably don't want 173 to use it with long range mode, since it will decrease the effectiveness of 174 the synchronization points, but your mileage may vary. 175* `-C`, `--[no-]check`: 176 add integrity check computed from uncompressed data (default: enabled) 177* `--[no-]content-size`: 178 enable / disable whether or not the original size of the file is placed in 179 the header of the compressed file. The default option is 180 --content-size (meaning that the original size will be placed in the header). 181* `--no-dictID`: 182 do not store dictionary ID within frame header (dictionary compression). 183 The decoder will have to rely on implicit knowledge about which dictionary to use, 184 it won't be able to check if it's correct. 185* `-M#`, `--memory=#`: 186 Set a memory usage limit. By default, Zstandard uses 128 MB for decompression 187 as the maximum amount of memory the decompressor is allowed to use, but you can 188 override this manually if need be in either direction (ie. you can increase or 189 decrease it). 190 191 This is also used during compression when using with --patch-from=. In this case, 192 this parameter overrides that maximum size allowed for a dictionary. (128 MB). 193 194 Additionally, this can be used to limit memory for dictionary training. This parameter 195 overrides the default limit of 2 GB. zstd will load training samples up to the memory limit 196 and ignore the rest. 197* `--stream-size=#` : 198 Sets the pledged source size of input coming from a stream. This value must be exact, as it 199 will be included in the produced frame header. Incorrect stream sizes will cause an error. 200 This information will be used to better optimize compression parameters, resulting in 201 better and potentially faster compression, especially for smaller source sizes. 202* `--size-hint=#`: 203 When handling input from a stream, `zstd` must guess how large the source size 204 will be when optimizing compression parameters. If the stream size is relatively 205 small, this guess may be a poor one, resulting in a higher compression ratio than 206 expected. This feature allows for controlling the guess when needed. 207 Exact guesses result in better compression ratios. Overestimates result in slightly 208 degraded compression ratios, while underestimates may result in significant degradation. 209* `-o FILE`: 210 save result into `FILE` 211* `-f`, `--force`: 212 disable input and output checks. Allows overwriting existing files, input 213 from console, output to stdout, operating on links, block devices, etc. 214* `-c`, `--stdout`: 215 write to standard output (even if it is the console) 216* `--[no-]sparse`: 217 enable / disable sparse FS support, 218 to make files with many zeroes smaller on disk. 219 Creating sparse files may save disk space and speed up decompression by 220 reducing the amount of disk I/O. 221 default: enabled when output is into a file, 222 and disabled when output is stdout. 223 This setting overrides default and can force sparse mode over stdout. 224* `--rm`: 225 remove source file(s) after successful compression or decompression. If used in combination with 226 -o, will trigger a confirmation prompt (which can be silenced with -f), as this is a destructive operation. 227* `-k`, `--keep`: 228 keep source file(s) after successful compression or decompression. 229 This is the default behavior. 230* `-r`: 231 operate recursively on directories. 232 It selects all files in the named directory and all its subdirectories. 233 This can be useful both to reduce command line typing, 234 and to circumvent shell expansion limitations, 235 when there are a lot of files and naming breaks the maximum size of a command line. 236* `--filelist FILE` 237 read a list of files to process as content from `FILE`. 238 Format is compatible with `ls` output, with one file per line. 239* `--output-dir-flat DIR`: 240 resulting files are stored into target `DIR` directory, 241 instead of same directory as origin file. 242 Be aware that this command can introduce name collision issues, 243 if multiple files, from different directories, end up having the same name. 244 Collision resolution ensures first file with a given name will be present in `DIR`, 245 while in combination with `-f`, the last file will be present instead. 246* `--output-dir-mirror DIR`: 247 similar to `--output-dir-flat`, 248 the output files are stored underneath target `DIR` directory, 249 but this option will replicate input directory hierarchy into output `DIR`. 250 251 If input directory contains "..", the files in this directory will be ignored. 252 If input directory is an absolute directory (i.e. "/var/tmp/abc"), 253 it will be stored into the "output-dir/var/tmp/abc". 254 If there are multiple input files or directories, 255 name collision resolution will follow the same rules as `--output-dir-flat`. 256* `--format=FORMAT`: 257 compress and decompress in other formats. If compiled with 258 support, zstd can compress to or decompress from other compression algorithm 259 formats. Possibly available options are `zstd`, `gzip`, `xz`, `lzma`, and `lz4`. 260 If no such format is provided, `zstd` is the default. 261* `-h`/`-H`, `--help`: 262 display help/long help and exit 263* `-V`, `--version`: 264 display version number and exit. 265 Advanced : `-vV` also displays supported formats. 266 `-vvV` also displays POSIX support. 267 `-q` will only display the version number, suitable for machine reading. 268* `-v`, `--verbose`: 269 verbose mode, display more information 270* `-q`, `--quiet`: 271 suppress warnings, interactivity, and notifications. 272 specify twice to suppress errors too. 273* `--no-progress`: 274 do not display the progress bar, but keep all other messages. 275* `--show-default-cparams`: 276 Shows the default compression parameters that will be used for a 277 particular src file. If the provided src file is not a regular file 278 (eg. named pipe), the cli will just output the default parameters. 279 That is, the parameters that are used when the src size is unknown. 280* `--`: 281 All arguments after `--` are treated as files 282 283### Restricted usage of Environment Variables 284 285Using environment variables to set parameters has security implications. 286Therefore, this avenue is intentionally restricted. 287Only `ZSTD_CLEVEL` and `ZSTD_NBTHREADS` are currently supported. 288They set the compression level and number of threads to use during compression, respectively. 289 290`ZSTD_CLEVEL` can be used to set the level between 1 and 19 (the "normal" range). 291If the value of `ZSTD_CLEVEL` is not a valid integer, it will be ignored with a warning message. 292`ZSTD_CLEVEL` just replaces the default compression level (`3`). 293 294`ZSTD_NBTHREADS` can be used to set the number of threads `zstd` will attempt to use during compression. 295If the value of `ZSTD_NBTHREADS` is not a valid unsigned integer, it will be ignored with a warning message. 296`ZSTD_NBTHREADS` has a default value of (`1`), and is capped at ZSTDMT_NBWORKERS_MAX==200. `zstd` must be 297compiled with multithread support for this to have any effect. 298 299They can both be overridden by corresponding command line arguments: 300`-#` for compression level and `-T#` for number of compression threads. 301 302 303DICTIONARY BUILDER 304------------------ 305`zstd` offers _dictionary_ compression, 306which greatly improves efficiency on small files and messages. 307It's possible to train `zstd` with a set of samples, 308the result of which is saved into a file called a `dictionary`. 309Then during compression and decompression, reference the same dictionary, 310using command `-D dictionaryFileName`. 311Compression of small files similar to the sample set will be greatly improved. 312 313* `--train FILEs`: 314 Use FILEs as training set to create a dictionary. 315 The training set should contain a lot of small files (> 100), 316 and weight typically 100x the target dictionary size 317 (for example, 10 MB for a 100 KB dictionary). 318 `--train` can be combined with `-r` to indicate a directory rather than listing all the files, 319 which can be useful to circumvent shell expansion limits. 320 321 `--train` supports multithreading if `zstd` is compiled with threading support (default). 322 Additional parameters can be specified with `--train-fastcover`. 323 The legacy dictionary builder can be accessed with `--train-legacy`. 324 The slower cover dictionary builder can be accessed with `--train-cover`. 325 Default is equivalent to `--train-fastcover=d=8,steps=4`. 326* `-o file`: 327 Dictionary saved into `file` (default name: dictionary). 328* `--maxdict=#`: 329 Limit dictionary to specified size (default: 112640). 330* `-#`: 331 Use `#` compression level during training (optional). 332 Will generate statistics more tuned for selected compression level, 333 resulting in a _small_ compression ratio improvement for this level. 334* `-B#`: 335 Split input files into blocks of size # (default: no split) 336* `-M#`, `--memory=#`: 337 Limit the amount of sample data loaded for training (default: 2 GB). See above for details. 338* `--dictID=#`: 339 A dictionary ID is a locally unique ID 340 that a decoder can use to verify it is using the right dictionary. 341 By default, zstd will create a 4-bytes random number ID. 342 It's possible to give a precise number instead. 343 Short numbers have an advantage : an ID < 256 will only need 1 byte in the 344 compressed frame header, and an ID < 65536 will only need 2 bytes. 345 This compares favorably to 4 bytes default. 346 However, it's up to the dictionary manager to not assign twice the same ID to 347 2 different dictionaries. 348* `--train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]`: 349 Select parameters for the default dictionary builder algorithm named cover. 350 If _d_ is not specified, then it tries _d_ = 6 and _d_ = 8. 351 If _k_ is not specified, then it tries _steps_ values in the range [50, 2000]. 352 If _steps_ is not specified, then the default value of 40 is used. 353 If _split_ is not specified or split <= 0, then the default value of 100 is used. 354 Requires that _d_ <= _k_. 355 If _shrink_ flag is not used, then the default value for _shrinkDict_ of 0 is used. 356 If _shrink_ is not specified, then the default value for _shrinkDictMaxRegression_ of 1 is used. 357 358 Selects segments of size _k_ with highest score to put in the dictionary. 359 The score of a segment is computed by the sum of the frequencies of all the 360 subsegments of size _d_. 361 Generally _d_ should be in the range [6, 8], occasionally up to 16, but the 362 algorithm will run faster with d <= _8_. 363 Good values for _k_ vary widely based on the input data, but a safe range is 364 [2 * _d_, 2000]. 365 If _split_ is 100, all input samples are used for both training and testing 366 to find optimal _d_ and _k_ to build dictionary. 367 Supports multithreading if `zstd` is compiled with threading support. 368 Having _shrink_ enabled takes a truncated dictionary of minimum size and doubles 369 in size until compression ratio of the truncated dictionary is at most 370 _shrinkDictMaxRegression%_ worse than the compression ratio of the largest dictionary. 371 372 Examples: 373 374 `zstd --train-cover FILEs` 375 376 `zstd --train-cover=k=50,d=8 FILEs` 377 378 `zstd --train-cover=d=8,steps=500 FILEs` 379 380 `zstd --train-cover=k=50 FILEs` 381 382 `zstd --train-cover=k=50,split=60 FILEs` 383 384 `zstd --train-cover=shrink FILEs` 385 386 `zstd --train-cover=shrink=2 FILEs` 387 388* `--train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]`: 389 Same as cover but with extra parameters _f_ and _accel_ and different default value of split 390 If _split_ is not specified, then it tries _split_ = 75. 391 If _f_ is not specified, then it tries _f_ = 20. 392 Requires that 0 < _f_ < 32. 393 If _accel_ is not specified, then it tries _accel_ = 1. 394 Requires that 0 < _accel_ <= 10. 395 Requires that _d_ = 6 or _d_ = 8. 396 397 _f_ is log of size of array that keeps track of frequency of subsegments of size _d_. 398 The subsegment is hashed to an index in the range [0,2^_f_ - 1]. 399 It is possible that 2 different subsegments are hashed to the same index, and they are considered as the same subsegment when computing frequency. 400 Using a higher _f_ reduces collision but takes longer. 401 402 Examples: 403 404 `zstd --train-fastcover FILEs` 405 406 `zstd --train-fastcover=d=8,f=15,accel=2 FILEs` 407 408* `--train-legacy[=selectivity=#]`: 409 Use legacy dictionary builder algorithm with the given dictionary 410 _selectivity_ (default: 9). 411 The smaller the _selectivity_ value, the denser the dictionary, 412 improving its efficiency but reducing its possible maximum size. 413 `--train-legacy=s=#` is also accepted. 414 415 Examples: 416 417 `zstd --train-legacy FILEs` 418 419 `zstd --train-legacy=selectivity=8 FILEs` 420 421 422BENCHMARK 423--------- 424 425* `-b#`: 426 benchmark file(s) using compression level # 427* `-e#`: 428 benchmark file(s) using multiple compression levels, from `-b#` to `-e#` (inclusive) 429* `-i#`: 430 minimum evaluation time, in seconds (default: 3s), benchmark mode only 431* `-B#`, `--block-size=#`: 432 cut file(s) into independent blocks of size # (default: no block) 433* `--priority=rt`: 434 set process priority to real-time 435 436**Output Format:** CompressionLevel#Filename : IntputSize -> OutputSize (CompressionRatio), CompressionSpeed, DecompressionSpeed 437 438**Methodology:** For both compression and decompression speed, the entire input is compressed/decompressed in-memory to measure speed. A run lasts at least 1 sec, so when files are small, they are compressed/decompressed several times per run, in order to improve measurement accuracy. 439 440ADVANCED COMPRESSION OPTIONS 441---------------------------- 442### -B#: 443Select the size of each compression job. 444This parameter is only available when multi-threading is enabled. 445Each compression job is run in parallel, so this value indirectly impacts the nb of active threads. 446Default job size varies depending on compression level (generally `4 * windowSize`). 447`-B#` makes it possible to manually select a custom size. 448Note that job size must respect a minimum value which is enforced transparently. 449This minimum is either 512 KB, or `overlapSize`, whichever is largest. 450Different job sizes will lead to (slightly) different compressed frames. 451 452### --zstd[=options]: 453`zstd` provides 22 predefined compression levels. 454The selected or default predefined compression level can be changed with 455advanced compression options. 456The _options_ are provided as a comma-separated list. 457You may specify only the options you want to change and the rest will be 458taken from the selected or default compression level. 459The list of available _options_: 460 461- `strategy`=_strat_, `strat`=_strat_: 462 Specify a strategy used by a match finder. 463 464 There are 9 strategies numbered from 1 to 9, from faster to stronger: 465 1=ZSTD\_fast, 2=ZSTD\_dfast, 3=ZSTD\_greedy, 466 4=ZSTD\_lazy, 5=ZSTD\_lazy2, 6=ZSTD\_btlazy2, 467 7=ZSTD\_btopt, 8=ZSTD\_btultra, 9=ZSTD\_btultra2. 468 469- `windowLog`=_wlog_, `wlog`=_wlog_: 470 Specify the maximum number of bits for a match distance. 471 472 The higher number of increases the chance to find a match which usually 473 improves compression ratio. 474 It also increases memory requirements for the compressor and decompressor. 475 The minimum _wlog_ is 10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit 476 platforms and 31 (2 GiB) on 64-bit platforms. 477 478 Note: If `windowLog` is set to larger than 27, `--long=windowLog` or 479 `--memory=windowSize` needs to be passed to the decompressor. 480 481- `hashLog`=_hlog_, `hlog`=_hlog_: 482 Specify the maximum number of bits for a hash table. 483 484 Bigger hash tables cause less collisions which usually makes compression 485 faster, but requires more memory during compression. 486 487 The minimum _hlog_ is 6 (64 B) and the maximum is 30 (1 GiB). 488 489- `chainLog`=_clog_, `clog`=_clog_: 490 Specify the maximum number of bits for a hash chain or a binary tree. 491 492 Higher numbers of bits increases the chance to find a match which usually 493 improves compression ratio. 494 It also slows down compression speed and increases memory requirements for 495 compression. 496 This option is ignored for the ZSTD_fast strategy. 497 498 The minimum _clog_ is 6 (64 B) and the maximum is 29 (524 Mib) on 32-bit platforms 499 and 30 (1 Gib) on 64-bit platforms. 500 501- `searchLog`=_slog_, `slog`=_slog_: 502 Specify the maximum number of searches in a hash chain or a binary tree 503 using logarithmic scale. 504 505 More searches increases the chance to find a match which usually increases 506 compression ratio but decreases compression speed. 507 508 The minimum _slog_ is 1 and the maximum is 'windowLog' - 1. 509 510- `minMatch`=_mml_, `mml`=_mml_: 511 Specify the minimum searched length of a match in a hash table. 512 513 Larger search lengths usually decrease compression ratio but improve 514 decompression speed. 515 516 The minimum _mml_ is 3 and the maximum is 7. 517 518- `targetLength`=_tlen_, `tlen`=_tlen_: 519 The impact of this field vary depending on selected strategy. 520 521 For ZSTD\_btopt, ZSTD\_btultra and ZSTD\_btultra2, it specifies 522 the minimum match length that causes match finder to stop searching. 523 A larger `targetLength` usually improves compression ratio 524 but decreases compression speed. 525t 526 For ZSTD\_fast, it triggers ultra-fast mode when > 0. 527 The value represents the amount of data skipped between match sampling. 528 Impact is reversed : a larger `targetLength` increases compression speed 529 but decreases compression ratio. 530 531 For all other strategies, this field has no impact. 532 533 The minimum _tlen_ is 0 and the maximum is 128 Kib. 534 535- `overlapLog`=_ovlog_, `ovlog`=_ovlog_: 536 Determine `overlapSize`, amount of data reloaded from previous job. 537 This parameter is only available when multithreading is enabled. 538 Reloading more data improves compression ratio, but decreases speed. 539 540 The minimum _ovlog_ is 0, and the maximum is 9. 541 1 means "no overlap", hence completely independent jobs. 542 9 means "full overlap", meaning up to `windowSize` is reloaded from previous job. 543 Reducing _ovlog_ by 1 reduces the reloaded amount by a factor 2. 544 For example, 8 means "windowSize/2", and 6 means "windowSize/8". 545 Value 0 is special and means "default" : _ovlog_ is automatically determined by `zstd`. 546 In which case, _ovlog_ will range from 6 to 9, depending on selected _strat_. 547 548- `ldmHashLog`=_lhlog_, `lhlog`=_lhlog_: 549 Specify the maximum size for a hash table used for long distance matching. 550 551 This option is ignored unless long distance matching is enabled. 552 553 Bigger hash tables usually improve compression ratio at the expense of more 554 memory during compression and a decrease in compression speed. 555 556 The minimum _lhlog_ is 6 and the maximum is 30 (default: 20). 557 558- `ldmMinMatch`=_lmml_, `lmml`=_lmml_: 559 Specify the minimum searched length of a match for long distance matching. 560 561 This option is ignored unless long distance matching is enabled. 562 563 Larger/very small values usually decrease compression ratio. 564 565 The minimum _lmml_ is 4 and the maximum is 4096 (default: 64). 566 567- `ldmBucketSizeLog`=_lblog_, `lblog`=_lblog_: 568 Specify the size of each bucket for the hash table used for long distance 569 matching. 570 571 This option is ignored unless long distance matching is enabled. 572 573 Larger bucket sizes improve collision resolution but decrease compression 574 speed. 575 576 The minimum _lblog_ is 1 and the maximum is 8 (default: 3). 577 578- `ldmHashRateLog`=_lhrlog_, `lhrlog`=_lhrlog_: 579 Specify the frequency of inserting entries into the long distance matching 580 hash table. 581 582 This option is ignored unless long distance matching is enabled. 583 584 Larger values will improve compression speed. Deviating far from the 585 default value will likely result in a decrease in compression ratio. 586 587 The default value is `wlog - lhlog`. 588 589### Example 590The following parameters sets advanced compression options to something 591similar to predefined level 19 for files bigger than 256 KB: 592 593`--zstd`=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6 594 595 596BUGS 597---- 598Report bugs at: https://github.com/facebook/zstd/issues 599 600AUTHOR 601------ 602Yann Collet 603