2 <a href="https://crates.io/crates/ouch">
3 <img src="https://img.shields.io/crates/v/ouch?color=6090FF&style=flat-square" alt="Crates.io link">
5 <a href="https://github.com/ouch/ouch-org/blob/master/LICENSE">
6 <img src="https://img.shields.io/crates/l/ouch?color=6090FF&style=flat-square" alt="License">
12 `ouch` stands for **Obvious Unified Compression Helper**.
14 It's a CLI tool for compressing and decompressing for various formats.
16 - [Features](#features)
18 - [Installation](#installation)
19 - [Supported Formats](#supported-formats)
20 - [Benchmarks](#benchmarks)
21 - [Contributing](#contributing)
27 3. Great error message feedback.
28 4. No runtime dependencies required (for _Linux x86_64_).
29 5. Accessibility mode ([see more](https://github.com/ouch-org/ouch/wiki/Accessibility)).
30 6. Shell completions and man pages.
34 Ouch has three main subcommands:
36 - `ouch decompress` (alias `d`)
37 - `ouch compress` (alias `c`)
38 - `ouch list` (alias `l` or `ls`)
42 Use the `decompress` subcommand, `ouch` will detect the extensions automatically.
47 # Decompress multiple files
48 ouch decompress a.zip b.tar.gz c.tar
51 The `-d/--dir` flag can be used to redirect decompression results to another directory.
54 # Decompress 'summer_vacation.zip' inside of new folder 'pictures'
55 ouch decompress summer_vacation.zip --dir pictures
60 Pass input files to the `compress` subcommand, add the **output file** at the end.
63 # Compress two files into `archive.zip`
64 ouch compress one.txt two.txt archive.zip
66 # Compress file.txt using .lz4 and .zst
67 ouch compress file.txt file.txt.lz4.zst
70 `ouch` detects the extensions of the **output file** to decide what formats to use.
77 # Example with tree formatting
78 ouch list source-code.zip --tree
107 | Format | `.tar` | `.zip` | `.gz` | `.xz`, `.lzma` | `.bz`, `.bz2` | `.lz4` | `.sz` | `.zst` |
108 |:---------:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
109 | Supported | ✓ | ✓¹ | ✓² | ✓ | ✓ | ✓ | ✓² | ✓ |
111 ✓: Supports compression and decompression.
113 ✓¹: Due to limitations of `.zip`, it doesn't support streaming (de)compression.
115 ✓²: Supported, and compression runs in parallel.
117 `tar` aliases are also supported: `tgz`, `tbz`, `tbz2`, `tlz4`, `txz`, `tlzma`, `tsz`, `tzst`.
119 Formats can be chained:
123 - `.tar.gz.gz.gz.zst.xz.bz.lz4`
125 If the filename has no extensions, `Ouch` will try to infer the format by the [file signature](https://en.wikipedia.org/wiki/List_of_file_signatures).
129 <a href="https://repology.org/project/ouch/versions">
130 <img align="right" src="https://repology.org/badge/vertical-allrepos/ouch.svg" alt="Packaging status" />
139 ## On Windows via Scoop
151 ## Download the latest release bundle
153 Check the [releases page](https://github.com/ouch-org/ouch/releases).
155 ## Compiling from source code
157 Check the [wiki guide on compiling](https://github.com/ouch-org/ouch/wiki/Compiling-and-installing-from-source-code).
161 If you installed `ouch` using the download script, you will need no dependencies (static MUSL binary).
163 Otherwise, you'll need these libraries installed on your system:
165 * [liblzma](https://www.7-zip.org/sdk.html)
166 * [libbz2](https://www.sourceware.org/bzip2/)
167 * [libz](https://www.zlib.net/)
169 These are available on all mainstream _Linux_ distributions and on _macOS_.
173 Benchmark results are available [here](benchmarks/results.md).
174 Performance of compressing and decompressing
175 [Rust](https://github.com/rust-lang/rust) source code are measured and compared with
176 [Hyperfine](https://github.com/sharkdp/hyperfine).
177 The values presented are the average (wall clock) elapsed time.
179 Note: `ouch` focuses heavily on usage ergonomics and nice error messages, but
180 we plan on doing some optimization in the future.
186 - [`unzip`][infozip] _6.00_
187 - [`zip`][infozip] _3.0_
191 `ouch` is made out of voluntary work, contributors are very welcome! No contribution is too small and all contributions are valued.
193 - Open an [issue](https://github.com/ouch-org/ouch/issues).
194 - Package it for your favorite distribution or package manager.
195 - Open a pull request.
196 - Share it with a friend!
198 [`tar`]: https://www.gnu.org/software/tar/
199 [infozip]: http://www.info-zip.org/