windows:xz

xz 圧縮

$ xz filename.tar

※filename.tar ファイルを圧縮後に削除して filename.tar.xz が生成される。
 ファイルを削除したくない場合は xz [-k, –keep] filename.tar を使用する。(keep オプション)

$ xz -v9 C:\wsl\FedoraRemix_x86_64.tar
C:\wsl\FedoraRemix_x86_64.tar (1/1)
  4.6 %         3.2 MiB / 334.9 MiB = 0.009    14 MiB/s       0:24   8 min 20 s

-v, –verbose オプションを使用して進行状況を表示する。
 -0 … -9 オプションを使用して高圧縮する。(デフォルト 6)

$ xz -vv9 C:\wsl\Fedora32_x86_64.tar
xz: Filter chain: --lzma2=dict=64MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0
xz: 674 MiB of memory is required. The limiter is disabled.
xz: Decompression will need 65 MiB of memory.
C:\wsl\Fedora32_x86_64.tar (1/1)
 24.6 %          7.1 MiB / 44.3 MiB = 0.159   2.6 MiB/s       0:17    1 min 0 s

-v, –verbose オプションをダブルで使用して進行状況を表示する。
 -0 … -9 オプションを使用して高圧縮する。(デフォルト 6)

Scoop によるインストール。

$ scoop install gow
Installing 'xz' (5.2.5) [64bit]
xz-5.2.5-windows.zip (1.4 MB) [======================================================================================] 100%
Checking hash of xz-5.2.5-windows.zip ... ok.
Extracting xz-5.2.5-windows.zip ... done.
Linking ~\scoop\apps\xz\current => ~\scoop\apps\xz\5.2.5
Creating shim for 'lzmadec'.
Creating shim for 'lzmainfo'.
Creating shim for 'xz'.
Creating shim for 'xzdec'.
'xz' (5.2.5) was installed successfully!

動作確認を行う。

$ xz --help
Usage: xz [OPTION]... [FILE]...
Compress or decompress FILEs in the .xz format.
 
  -z, --compress      force compression
  -d, --decompress    force decompression
  -t, --test          test compressed file integrity
  -l, --list          list information about .xz files
  -k, --keep          keep (don't delete) input files
  -f, --force         force overwrite of output file and (de)compress links
  -c, --stdout        write to standard output and don't delete input files
  -0 ... -9           compression preset; default is 6; take compressor *and*
                      decompressor memory usage into account before using 7-9!
  -e, --extreme       try to improve compression ratio by using more CPU time;
                      does not affect decompressor memory requirements
  -T, --threads=NUM   use at most NUM threads; the default is 1; set to 0
                      to use as many threads as there are processor cores
  -q, --quiet         suppress warnings; specify twice to suppress errors too
  -v, --verbose       be verbose; specify twice for even more verbose
  -h, --help          display this short help and exit
  -H, --long-help     display the long help (lists also the advanced options)
  -V, --version       display the version number and exit
 
With no FILE, or when FILE is -, read standard input.
 
Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
XZ Utils home page: <https://tukaani.org/xz/>
  • windows/xz.txt
  • 最終更新: 2020/09/11 19:08
  • by ともやん