ouch
stands for Obvious Unified Compression Helper.
It's a CLI tool for compressing and decompressing for various formats.
Ouch has three main subcommands:
ouch decompress
(alias d
)ouch compress
(alias c
)ouch list
(alias l
)Use the decompress
subcommand, ouch
will detect the extensions automatically.
```sh ouch decompress a.zip
ouch decompress a.zip b.tar.gz c.tar ```
The -d/--dir
flag can be used to redirect decompression results to another directory.
```sh
ouch decompress summer_vacation.zip --dir pictures ```
Pass input files to the compress
subcommand, add the output file at the end.
```sh
archive.zip
ouch compress one.txt two.txt archive.zip
ouch compress file.txt file.txt.lz4.zst ```
ouch
detects the extensions of the output file to decide what formats to use.
```sh ouch list archive.zip
ouch list source-code.zip --tree ```
Output:
└── src
├── archive
│ ├── mod.rs
│ ├── tar.rs
│ └── zip.rs
├── utils
│ ├── colors.rs
│ ├── formatting.rs
│ ├── mod.rs
│ └── fs.rs
├── commands
│ ├── list.rs
│ ├── compress.rs
│ ├── decompress.rs
│ └── mod.rs
├── accessible.rs
├── error.rs
├── cli.rs
└── main.rs
| Format | .tar
| .zip
| .gz
| .xz
, .lzma
| .bz
, .bz2
| .lz4
| .sz
| .zst
|
|:---------:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Supported | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
And the aliases: tgz
, tbz
, tbz2
, tlz4
, txz
, tlzma
, tsz
, tzst
.
Formats can be chained:
.tar.gz
.tar.gz.gz.gz.gz
.tar.gz.gz.gz.gz.zst.xz.bz.lz4
bash
yay -S ouch
bash
cargo install ouch
Check the releases page.
Check the wiki guide on compiling.
If you installed ouch
using the download script, you will need no dependencies (static MUSL binary).
Otherwise, you'll need these libraries installed on your system:
These are available on all mainstream Linux distributions and on macOS.
Benchmark results are available here. Performance of compressing and decompressing Rust source code are measured and compared with Hyperfine. The values presented are the average (wall clock) elapsed time.
Note: ouch
focuses heavily on usage ergonomics and nice error messages, but
we plan on doing some optimization in the future.
Versions used:
ouch
is made out of voluntary work, contributors are very welcome! No contribution is too small and all contributions are valued.