ZSTD(1) ZSTD(1) (NAME) zstd - zstd zstdmt unzstd zstdcat - .zst (SYNOPSIS) zstdmt zstd -T0 unzstd zstd -d zstdcat zstd -dcf (DESCRIPTION) zstd gzip(1) xz(1) . LZ77 FSE huff0 . zstd . () . zstd gzip : O . --rm . O zstd . -q . O zstd . -q . O zstd stdin . O zstd . zstd file . file file - zstd . zstd : . zstd . --stdout -o file file : O .zst . O .zst . .zst (Concatenation with .zst Files) .zst . zstd .zst . (OPTIONS) (Integer Suffixes and Special Values) . . KiB , (2\^10). Ki K KB KiB . MiB ,, (2\^20). Mi M MB MiB . (Operation Mode) . -z, --compress . ( unzstd --decompress ). -d, --decompress, --uncompress ( ). -t, --test file . --decompress --stdout > /dev/null (checksum) . . -b# () () #. BENCHMARK . --train FILES FILES . (> ). DICTIONARY BUILDER . -l, --list zstd . . -v . (Operation Modifiers) O -#: # [1-19] (: 3) O --ultra: ( ) . . O --fast[=#]: . =# 1 . . ( ) . --fast . O -T#, --threads=#: # (: 1). # 0 CPU . ZSTDMT_NBWORKERS_MAX - - . zstd . O --single-thread: / . / . - . : . : -T1 / . -T1 . O --auto-threads={physical,logical} (: physical): -T0 . O --adapt[=min=#,max=#]: zstd / . -v . min max . --long . --single-thread . 8 MiB ( wlog ). . : --adapt (>=2) . O --long[=#]: windowLog # # 27 . (windowLog) . . : windowLog --long=windowLog --memory=windowSize . O -D DICT: DICT FILE() O --patch-from FILE: (diff) zstd . windowSize > srcSize . : -D . : chainLog < fileLog --long (fileLog windowLog ). . : --patch-from --single-thread . : ( 4096) --zstd=targetLength= --zstd=chainLog= . O --rsyncable: zstd rsync . . --single-thread . . O -C, --[no-]check: (: ) O --[no-]content-size: / . --content-size ( ). O --no-dictID: ( ). . O -M#, --memory=#: . zstd 128 MiB ( ). --patch-from= . (128 MiB). . . zstd . O --stream-size=#: . . . . O --size-hint=#: zstd . . . . . O -o FILE: FILE. O -f, --force: . stdout . stdout . O -c, --stdout: ( ) . O --[no-]sparse: / (sparse) . / . : stdout . stdout . O --[no-]pass-through: / . . stdout (-f) . O --rm: () . stdout . -o ( -f ). O -k, --keep: () . . O -r: . . . O --filelist FILE: FILE. ls . O --output-dir-flat DIR: DIR . . DIR -f . O --output-dir-mirror DIR: --output-dir-flat DIR DIR . <<..>> . ( <>) <> . --output-dir-flat . O --format=FORMAT: . zstd . zstd gzip xz lzma lz4. zstd . O -h/-H, --help: / O -V, --version: . : -vV . -vvV POSIX . -q . O -v, --verbose: O -q, --quiet: . . O --no-progress: . O --show-default-cparams: . ( pipe) . O --: -- gzip (gzip Operation Modifiers) gzip zstd gzip : -n, --no-name . (no-op) . --best -9. (Environment Variables) . . ZSTD_CLEVEL ZSTD_NBTHREADS . . ZSTD_CLEVEL ( <<>>) . ZSTD_CLEVEL . ZSTD_CLEVEL (3) . ZSTD_NBTHREADS zstd . ZSTD_NBTHREADS . ZSTD_NBTHREADS (1) ZSTDMT_NBWORKERS_MAX==200 . zstd . : -# -T# . (DICTIONARY BUILDER) zstd . zstd . -D dictionaryFileName . . --train FILEs FILE . (> ) ( 10 MB 100 KB). --train -r . . 128 KiB . zstd () --train . --train-fastcover . --train-legacy . cover --train-cover . --train --train-fastcover=d=8,steps=4 . -o FILE FILE ( : dictionary). --maxdict=# (: 112640 ). ( KB MB) . -# # (). . -B# # (: ) -M#, --memory=# (: 2 GB). (2 GB) . . . . . (deterministic) . --dictID=# (dictionary ID) . . zstd . . . : . . RFC8878 32768 2\^31 . --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]] cover. d d = 6 d = 8 . k steps [50, 2000] . steps 40 . split split <= 0 100 . d <= k . shrink shrinkDict 0 . shrink 1 shrinkDictMaxRegression . k . d . d [6, 8] 16 d <= 8 . k [2 * d, 2000] . split 100 d k . zstd . shrink shrinkDictMaxRegression% . : zstd --train-cover FILEs zstd --train-cover=k=50,d=8 FILEs zstd --train-cover=d=8,steps=500 FILEs zstd --train-cover=k=50 FILEs zstd --train-cover=k=50,split=60 FILEs zstd --train-cover=shrink FILEs zstd --train-cover=shrink=2 FILEs --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#] cover f accel split. split split = 75 . f f = 20 . 0 < f < 32 . accel accel = 1 . 0 < accel <= 10 . d = 6 d = 8 . f d . [0,2^f - 1] . . f . : zstd --train-fastcover FILEs zstd --train-fastcover=d=8,f=15,accel=2 FILEs --train-legacy[=selectivity=#] selectivity (: 9). selectivity . --train-legacy=s=# . : zstd --train-legacy FILEs zstd --train-legacy=selectivity=8 FILEs (BENCHMARK) -b# () # -e# () -b# -e# ( ) -i# (: 3s) -B#, --block-size=# () # (: ) --priority=rt (real-time) : CompressionLevel#Filename: InputSize -> OutputSize (CompressionRatio), CompressionSpeed, DecompressionSpeed : (in-memory) . . (ADVANCED COMPRESSION OPTIONS) ### -B#: . . . ( 4 * windowSize). -B# . . 512 KB overlapSize ( ) . . --zstd[=options]: zstd . . ( --show-default-cparams .) . (options) . . (options) : strategy=strat, strat=strat () (match finder). : 1=ZSTD_fast 2=ZSTD_dfast 3=ZSTD_greedy 4=ZSTD_lazy 5=ZSTD_lazy2 6=ZSTD_btlazy2 7=ZSTD_btopt 8=ZSTD_btultra 9=ZSTD_btultra2. windowLog=wlog, wlog=wlog . . . wlog 10 (1 KiB) 30 (1 GiB) - 31 (2 GiB) - . : windowLog --long=windowLog --memory=windowSize . hashLog=hlog, hlog=hlog . . hlog 6 (64 / 256 B) 30 (1B / 4 GiB) . chainLog=clog, clog=clog strategy . . . ZSTD_fast strategy . clog 6 (64 / 256 B) 29 (512M / 2 GiB) - 30 (1B / 4 GiB) - . searchLog=slog, slog=slog . . slog 1 'windowLog' - 1 . minMatch=mml, mml=mml . . mml 3 7 . targetLength=tlen, tlen=tlen . ZSTD_btopt ZSTD_btultra ZSTD_btultra2 . targetLength . ZSTD_fast . . : targetLength . . tlen 0 128 KiB . overlapLog=ovlog, ovlog=ovlog overlapSize . . . ovlog 0 9 . 1 << >> . 9 << >> windowSize . ovlog . 8 <> 6 <> . 0 <<>> : ovlog zstd strat ovlog 6 9 . ldmHashLog=lhlog, lhlog=lhlog . . . lhlog 6 30 (: 20). ldmMinMatch=lmml, lmml=lmml . . . lmml 4 4096 (: 64). ldmBucketSizeLog=lblog, lblog=lblog . . . lblog 1 8 (: 3). ldmHashRateLog=lhrlog, lhrlog=lhrlog . . . . wlog - lhlog . (Example) 256 KB : --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6 (AUTHOR) Yann Collet (REPORTING BUGS) : (COPYRIGHT) (C) 2016- Meta Platforms, Inc. . Yann Collet. : BSD (BSD 3-Clause) GPLv2. : . (SEE ALSO) zstdgrep(1), zstdless(1), gzip(1), xz(1) zstandard : Y. Collet, "Zstandard Compression and the 'application/zstd' Media Type", https://www.ietf.org/rfc/rfc8878.txt, Internet RFC 8878 (February 2021). zstd 1.5.4 February 2023 ZSTD(1)