add kind
[webi-installers/.git] / xz / README.md
1 ---
2 title: XZ Utils
3 homepage: https://tukaani.org/xz/
4 tagline: |
5   XZ Utils is free general-purpose data compression software with a high compression ratio.
6 ---
7
8 ### Updating `xz`
9
10 `webi xz@stable`
11
12 The Windows builds are the official builds. The Mac and Linux builds are from
13 [github.com/therootcompany/xz-static](https://github.com/therootcompany/xz-static).
14
15 ## Cheat Sheet
16
17 `xz` and `unxz` are modern alternatives to `gzip` (and `gunzip`). They use LZMA2
18 (de)compression (like 7z), and is supported across many platforms, and by `tar`.
19
20 Here's the shortlist of options we've found most useful:
21
22 ```txt
23 -z, --compress      force compression
24 -d, --decompress    force decompression
25 -l, --list          list information about .xz files
26
27 -k, --keep          keep (don't delete) input files
28 -c, --stdout        write to standard output and don't delete input files
29
30 -0 ... -9           (de)compression can take up to 4gb RAM at 7-9 (default 6)
31 -e, --extreme       try to improve compression ratio by using more CPU time
32 -T, --threads=N     use up to N threads; set to 0 to match CPU cores (default 1)
33 ```
34
35 ### How to "Unzip"
36
37 ```bash
38 unxz -k example.xz
39 ```
40
41 ```bash
42 tar xvf example.tar.xz
43 ```
44
45 ### How to "Zip"
46
47 ```bash
48 xz -k ./example
49 ```
50
51 ```bash
52 tar cvf example.tar.xz ./example
53 ```