ouch stands for Obvious Unified Compression Helper.
It's a CLI tool for compressing and decompressing for various formats.
- Easy to use.
- Fast.
- Great error message feedback.
- No runtime dependencies required (for Linux x86_64).
- Accessibility mode (see more).
- Shell completions and man pages.
Ouch has three main subcommands:
ouch decompress(aliasd)ouch compress(aliasc)ouch list(aliaslorls)
To see help for a specific command:
ouch help <COMMAND>
ouch <COMMAND> --help # equivalentUse the decompress subcommand, ouch will detect the extensions automatically.
ouch decompress a.zip
# Decompress multiple files
ouch decompress a.zip b.tar.gz c.tarThe -d/--dir flag can be used to redirect decompression results to another directory.
# Decompress 'summer_vacation.zip' inside of new folder 'pictures'
ouch decompress summer_vacation.zip --dir picturesPass input files to the compress subcommand, add the output file at the end.
# Compress two files into `archive.zip`
ouch compress one.txt two.txt archive.zip
# Compress file.txt using .lz4 and .zst
ouch compress file.txt file.txt.lz4.zstouch detects the extensions of the output file to decide what formats to use.
ouch list archive.zip
# Example with tree formatting
ouch list source-code.zip --treeOutput:
└── 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 | ✓ | ✓¹ | ✓² | ✓ | ✓ | ✓ | ✓² | ✓ |
✓: Supports compression and decompression.
✓¹: Due to limitations of .zip, it doesn't support streaming (de)compression.
✓²: Supported, and compression runs in parallel.
tar aliases are also supported: tgz, tbz, tbz2, tlz4, txz, tlzma, tsz, tzst.
Formats can be chained:
.zst.gz.tar.gz.gz.tar.gz.gz.gz.zst.xz.bz.lz4
If the filename has no extensions, Ouch will try to infer the format by the file signature.
pacman -S ouchscoop install ouchcargo install ouchCheck 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.
- Open an issue.
- Package it for your favorite distribution or package manager.
- Open a pull request.
- Share it with a friend!