descriptionUnified compression and decompression utility
homepage URLhttps://github.com/vrmiguel/ouch
repository URLhttps://github.com/vrmiguel/ouch
ownervrmiguel99@gmail.com
last changeSat, 27 Apr 2024 05:56:40 +0000 (27 02:56 -0300)
last refreshSat, 27 Apr 2024 07:07:00 +0000 (27 09:07 +0200)
content tags
add:
README.md

Crates.io link License

Ouch!

ouch stands for Obvious Unified Compression Helper.

It's a CLI tool for compressing and decompressing for various formats.

Features

  1. Easy to use.
  2. Fast.
  3. Great error message feedback.
  4. No runtime dependencies required (for Linux x86_64).
  5. Accessibility mode (see more).
  6. Shell completions and man pages.

Usage

Ouch has three main subcommands:

To see help for a specific command:

ouch help <COMMAND>
ouch <COMMAND> --help  # equivalent

Decompressing

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

Compressing

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.

Listing

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

Supported formats

Format.tar.zip7z.gz.xz, .lzma.bz, .bz2.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:

If the filename has no extensions, Ouch will try to infer the format by the file signature and ask the user for confirmation.

Installation

Packaging status

On Arch Linux

pacman -S ouch

On Windows via Scoop

scoop install ouch

From crates.io

cargo install ouch

Download the latest release bundle

Check the releases page.

Compiling from source code

Check the wiki guide on compiling.

Runtime Dependencies

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.

Benchmarks

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:

Contributing

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.

shortlog
101 min ago dependabot... build(deps): bump flate2 from 1.0.28 to 1.0.29main
2024-04-12 dependabot... build(deps): bump time from 0.3.35 to 0.3.36
2024-04-11 dependabot... build(deps): bump sevenz-rust from 0.5.4 to 0.6.0 ...
2024-04-11 dependabot... build(deps): bump clap_complete from 4.5.1 to 4.5.2...
2024-04-11 dependabot... build(deps): bump time from 0.3.34 to 0.3.35 (#658)
2024-04-03 dependabot... build(deps): bump lz4_flex from 0.11.2 to 0.11.3
2024-04-01 dependabot... build(deps): bump insta from 1.37.0 to 1.38.0
2024-04-01 Antonios BarotsisSwitched to explicit shutdown message instead of None
2024-04-01 João Marcos... fix STDIN syncrhonization problems
2024-04-01 João Marcos... logger: fix warning output
2024-04-01 João Marcos... update CHANGELOG.md
2024-04-01 João Marcos... remove `macros.rs` module
2024-04-01 João Marcos... logger: flush logs temporarily
2024-04-01 João Marcos... handle logger thread in main function
2024-04-01 João Marcos... logger: refactor usage of sync primitives
2024-04-01 João Marcos... move `spawn_logger_thread` to logger module
...
tags
4 months ago 0.5.1
4 months ago 0.5.0
8 months ago 0.4.2
15 months ago 0.4.1
17 months ago 0.4.0
2 years ago 0.3.1
2 years ago 0.3.0
2 years ago 0.2.0
2 years ago 0.1.6
2 years ago 0.1.5
3 years ago 0.1.5-rc
3 years ago 0.1.4
heads
100 min ago dependabot/cargo/zip-1.1.1
101 min ago main
7 weeks ago use-path-display-and-remove-our-custom-display-impl
7 weeks ago fix-extension-parsing
4 months ago ci-cleanup-_-temporary-tests
4 months ago fix-manual-release-ci-action
5 months ago fix-manual-release-ci
9 months ago bzip3
10 months ago fix/panic-on-zip-zip
12 months ago symlinks
14 months ago nitpick-on-readme
15 months ago readd-python-test-script
21 months ago branch-prediction
2 years ago too-much-canonicalization
2 years ago 0.3.1
2 years ago 0.3.0
...