refactor: finish moving ssh-* scripts to own installers
[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 To update or switch versions, run `webi xz@stable` (or `@v5.2`, `@beta`, etc).
9
10 ## Cheat Sheet
11
12 `xz` and `unxz` are modern alternatives to `gzip` (and `gunzip`). They use LZMA2
13 (de)compression (like 7z), and is supported across many platforms, and by `tar`.
14
15 Here's the shortlist of options we've found most useful:
16
17 ```txt
18 -z, --compress      force compression
19 -d, --decompress    force decompression
20 -l, --list          list information about .xz files
21
22 -k, --keep          keep (don't delete) input files
23 -c, --stdout        write to standard output and don't delete input files
24
25 -0 ... -9           (de)compression can take up to 4gb RAM at 7-9 (default 6)
26 -e, --extreme       try to improve compression ratio by using more CPU time
27 -T, --threads=N     use up to N threads; set to 0 to match CPU cores (default 1)
28 ```
29
30 ### How to "Unzip"
31
32 ```bash
33 unxz -k example.xz
34 ```
35
36 ```bash
37 tar xvf example.tar.xz
38 ```
39
40 ### How to "Zip"
41
42 ```bash
43 xz -k ./example
44 ```
45
46 ```bash
47 tar cvf example.tar.xz ./example
48 ```