description | Unified compression and decompression utility |
homepage URL | https://github.com/vrmiguel/ouch |
repository URL | https://github.com/vrmiguel/ouch |
owner | vrmiguel99@gmail.com |
last change | Wed, 20 Nov 2024 08:23:20 +0000 (20 05:23 -0300) |
last refresh | Thu, 21 Nov 2024 08:20:54 +0000 (21 09:20 +0100) |
mirror URL | git://repo.or.cz/ouch.git |
https://repo.or.cz/ouch.git | |
ssh://git@repo.or.cz/ouch.git | |
bundle info | ouch.git downloadable bundles |
content tags |
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
or ls
)To see help
for a specific command:
ouch help <COMMAND>
ouch <COMMAND> --help # equivalent
Use the decompress
subcommand, ouch
will detect the extensions automatically.
ouch decompress a.zip
# Decompress multiple files
ouch decompress a.zip b.tar.gz c.tar
The -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 pictures
Pass 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.zst
ouch
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 --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 | 7z | .gz | .xz , .lzma | .bz , .bz2 | .bz3 | .lz4 | .sz (Snappy) | .zst | .rar |
---|---|---|---|---|---|---|---|---|---|---|---|
Supported | ✓ | ✓¹ | ✓¹ | ✓² | ✓ | ✓ | ✓ | ✓ | ✓² | ✓² | ✓³ |
✓: Supports compression and decompression.
✓¹: Due to limitations of the compression format itself, (de)compression can't be done with streaming.
✓²: Supported, and compression runs in parallel.
✓³: Due to RAR's restrictive license, only decompression and listing can be supported.
If you wish to exclude non-free code from your build, you can disable RAR support
by building without the unrar
feature.
tar
aliases are also supported: tgz
, tbz
, tbz2
, tlz4
, txz
, tlzma
, tsz
, tzst
.
Formats can be chained:
.tar.gz
.tar.gz.xz.zst.gz.lz4.sz
If the filename has no extensions, Ouch
will try to infer the format by the file signature and ask the user for confirmation.
pacman -S ouch
scoop install ouch
cargo install ouch
Check the releases page.
Check the wiki guide on compiling.
If running ouch
results in a linking error, it means you're missing a runtime dependency.
If you're downloading binaries from the releases page, try the musl
variants, those are static binaries that require no runtime dependencies.
Otherwise, you'll need these libraries installed on your system:
These should be available in your system's package manager.
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! Contributions of all sizes are appreciated.
If you're creating a Pull Request, check CONTRIBUTING.md.
11 months ago | 0.5.1 | commitlog | ||
11 months ago | 0.5.0 | commitlog | ||
15 months ago | 0.4.2 | commitlog | ||
22 months ago | 0.4.1 | commitlog | ||
23 months ago | 0.4.0 | commitlog | ||
3 years ago | 0.3.1 | commitlog | ||
3 years ago | 0.3.0 | commitlog | ||
3 years ago | 0.2.0 | commitlog | ||
3 years ago | 0.1.6 | commitlog | ||
3 years ago | 0.1.5 | commitlog | ||
3 years ago | 0.1.5-rc | commitlog | ||
3 years ago | 0.1.4 | commitlog |
24 hours ago | main | logtree |
2 months ago | dependabot/cargo/zip-2.2.0 | logtree |
8 months ago | use-path-display-and-remove-our-custom-display-impl | logtree |
17 months ago | fix/panic-on-zip-zip | logtree |
19 months ago | symlinks | logtree |
21 months ago | nitpick-on-readme | logtree |
22 months ago | readd-python-test-script | logtree |
2 years ago | branch-prediction | logtree |
2 years ago | too-much-canonicalization | logtree |
3 years ago | ci | logtree |
3 years ago | zstd-thin-conditional | logtree |
3 years ago | 0.2.0 | logtree |
3 years ago | 0.1.6 | logtree |
3 years ago | multithreaded-testing | logtree |
3 years ago | async-tar | logtree |
3 years ago | 0.1.5 | logtree |
... |