3 [![crates.io](https://img.shields.io/crates/v/ouch.svg?style=for-the-badge&logo=rust)](https://crates.io/crates/ouch) [![license](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge&logo=Open-Source-Initiative&logoColor=ffffff)](https://github.com/ouch-org/ouch/blob/main/LICENSE)
5 `ouch` stands for **Obvious Unified Compression Helper**, it's a CLI tool to compress and decompress files.
7 - [Features](#features)
9 - [Installation](#installation)
10 - [Supported Formats](#supported-formats)
11 - [Contributing](#contributing)
16 2. Automatic format detection.
17 3. Same syntax, various formats.
18 4. Encoding and decoding streams, it's fast. <!-- We should post benchmarks in our wiki and link them here -->
19 5. No runtime dependencies (for _Linux x86_64_).
25 Use the `decompress` subcommand and pass the files.
32 ouch decompress a.zip b.tar.gz c.tar
38 You can redirect the decompression results to another folder with the `-d/--dir` flag.
41 # Decompress 'summer_vacation.zip' inside of new folder 'pictures'
42 ouch decompress summer_vacation.zip -d pictures
47 Use the `compress` subcommand, pass the files and the **output file** at the end.
50 # Compress four files/folders
51 ouch compress 1 2 3 4 archive.zip
54 ouch c file.txt file.zip
56 # Compress everything in the current folder again and again
57 ouch compress * everything.tar.gz.xz.bz.zst.gz.gz.gz.gz.gz
60 `ouch` checks for the extensions of the **output file** to decide which formats should be used.
64 [![Packaging status](https://repology.org/badge/vertical-allrepos/ouch.svg)](https://repology.org/project/ouch/versions)
66 ### Downloading the latest binary
68 Compiled for `x86_64` on _Linux_, _Mac OS_ and _Windows_, run with `curl` or `wget`.
71 |:---------:|:-----------------------------------------------------------------------------------|
72 | **curl** | `curl -s https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh \| sh` |
73 | **wget** | `wget https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh -O - \| sh` |
76 The script will download the [latest binary](https://github.com/ouch-org/ouch/releases) and copy it to `/usr/bin`.
78 ### Installing from source code
80 For compiling, check the [wiki guide](https://github.com/ouch-org/ouch/wiki/Compiling-and-installing-from-source-code).
84 | Format | .tar | .zip | .bz, .bz2 | .gz | .xz, .lz, .lzma | .zst |
85 |:-------------:|:----:|:----:|:---------:| --- |:---------------:| --- |
86 | Supported | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
88 And the aliases: `tgz`, `tbz`, `tbz2`, `txz`, `tlz`, `tlzma`, `tzst`.
90 Formats can be chained (`ouch` keeps it _fast_):
94 - `.tar.gz.gz.gz.gz.xz.xz.xz.xz.bz.bz.bz.bz.zst.zst.zst.zst`
98 `ouch` is 100% made out of voluntary work, any small contribution is welcome!
101 - Open a pull request.
102 - Share it to a friend!