# ouch-org/ouch

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ouch-org-ouch).**

3,391 stars · 119 forks · Rust · other

## Links

- GitHub: https://github.com/ouch-org/ouch
- Homepage: https://crates.io/crates/ouch
- awesome-repositories: https://awesome-repositories.com/repository/ouch-org-ouch.md

## Topics

`cli` `compression` `decompression` `hacktoberfest` `rust`

## Description

Ouch is a command-line archive utility designed for compressing and decompressing files across multiple formats, including zip, tar, 7z, and zstd. It functions as a secure archive processor that sanitizes metadata to prevent path traversal attacks and terminal injection during extraction.

The tool features a chain compression pipeline that allows for the sequential application of multiple compression algorithms by parsing chains of file extensions in a filename. It also includes a dedicated accessibility mode that optimizes terminal output for screen readers and text-to-speech technologies by reducing verbosity and stripping non-essential details.

Broad capabilities cover archive management, including content listing, password protection, and multi-threaded compression to increase data throughput. The utility handles extraction through configurable output directories, conflict resolution renaming, and the ability to exclude hidden files or those matching gitignore patterns.

Runtime behavior and resource limits, such as decompressed output size limits, can be managed via environment variables.

## Tags

### Part of an Awesome List

- [File Compression](https://awesome-repositories.com/f/awesome-lists/devtools/file-compression.md) — Bundles and compresses files into a wide range of industry-standard archive formats including tar, zip, and zstd. ([source](https://github.com/ouch-org/ouch/blob/main/README.md))
- [Terminal Archive Commands](https://awesome-repositories.com/f/awesome-lists/data/compression-and-archiving/terminal-archive-commands.md) — Provides a terminal interface for creating, extracting, and inspecting archives with automatic format detection.
- [Archive Content Listers](https://awesome-repositories.com/f/awesome-lists/data/compression-and-archiving/archive-content-listers.md) — Provides a way to list the internal files and directory structure of an archive without extracting them. ([source](https://github.com/ouch-org/ouch/blob/main/README.md))
- [Multithreaded](https://awesome-repositories.com/f/awesome-lists/devtools/compression/multithreaded.md) — Uses multi-threaded processing to accelerate the compression and decompression of archives across multiple CPU cores. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))
- [Compression Level Tuning](https://awesome-repositories.com/f/awesome-lists/devtools/file-compression/compression-level-tuning.md) — Allows users to adjust compression levels using speed-based flags to balance performance and file size. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))
- [System Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/system-utilities.md) — Compression and decompression CLI.

### Development Tools & Productivity

- [Multi-Format Archive Management](https://awesome-repositories.com/f/development-tools-productivity/multi-format-archive-management.md) — Provides a unified terminal interface for compressing and extracting files across various archive formats with automatic detection.
- [Secure Extraction Sanitization](https://awesome-repositories.com/f/development-tools-productivity/archive-extraction-utilities/secure-extraction-sanitization.md) — Sanitizes archive metadata during extraction to prevent path traversal attacks and terminal injection.
- [Archive Format Identification](https://awesome-repositories.com/f/development-tools-productivity/archive-management/archive-format-identification.md) — Automatically selects the correct compression or decompression backend by matching file extensions.
- [File Exclusion Patterns](https://awesome-repositories.com/f/development-tools-productivity/file-exclusion-patterns.md) — Excludes hidden files and patterns defined in .gitignore from the compression process. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))

### Content Management & Publishing

- [Multi-Format Archive Extraction Commands](https://awesome-repositories.com/f/content-management-publishing/content-archiving/web-content-archivers/session-data-archivers/remote-archive-extraction/archive-extraction/multi-format-archive-extraction-commands.md) — Extracts contents from various compressed formats by automatically detecting the archive type. ([source](https://github.com/ouch-org/ouch/blob/main/README.md))
- [Secure Metadata Sanitization](https://awesome-repositories.com/f/content-management-publishing/directory-archiving/archive-extraction-commands/secure-metadata-sanitization.md) — Implements metadata sanitization to protect against path traversal and terminal injection attacks during archive extraction.
- [Archive Extraction Commands](https://awesome-repositories.com/f/content-management-publishing/directory-archiving/archive-extraction-commands.md) — Enables unpacking archives into the current directory, a new folder, or a specific custom path. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))

### Data & Databases

- [Layered Compression](https://awesome-repositories.com/f/data-databases/data-serialization-compression/lz4-compression-pipelines/standard-format-compression/layered-compression.md) — Applies multiple compression algorithms sequentially by chaining file extensions to achieve layered data reduction.
- [Sequential Compression Pipelines](https://awesome-repositories.com/f/data-databases/sequential-compression-pipelines.md) — Processes data through a chain of compression algorithms by parsing multiple file extensions in the output filename.
- [Password-Protected Archives](https://awesome-repositories.com/f/data-databases/data-import-and-export/collection-exports/password-protected-archives.md) — Provides the ability to create and manage password-protected archives for secure file storage. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))

### Graphics & Multimedia

- [Format Dispatch](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/image-processing/format-support-extensions/format-dispatch.md) — Matches file extensions to specific backend modules to determine the correct compression or decompression algorithm.

### Security & Cryptography

- [Archive Input Sanitizers](https://awesome-repositories.com/f/security-cryptography/application-and-system-security/web-security/input-sanitization/archive-input-sanitizers.md) — Sanitizes archive filenames, comments, and symlink targets before processing to prevent injection and traversal attacks.
- [Filename Sanitizers](https://awesome-repositories.com/f/security-cryptography/file-upload-security/attachment-security-validators/filename-sanitizers.md) — Cleans filenames and symlink targets before processing to prevent path traversal and terminal injection attacks.
- [Archive Metadata Sanitizers](https://awesome-repositories.com/f/security-cryptography/file-upload-security/attachment-security-validators/filename-sanitizers/archive-metadata-sanitizers.md) — Cleans filenames and symlink targets from archives to prevent path traversal and terminal injection attacks during extraction. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))
- [Archive Encryption](https://awesome-repositories.com/f/security-cryptography/credential-encryption/decryption-utilities/archive-encryption.md) — Encrypts and decrypts archives using password protection to secure files for storage or transfer.

### Software Engineering & Architecture

- [Archive Format Plugins](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/plugin-format-adapters/archive-format-plugins.md) — Uses a backend-agnostic plugin architecture where each archive format is handled by a separate module.
- [Sequential Compression Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/sequential-compression-pipelines.md) — Implements a chain compression pipeline that applies multiple algorithms sequentially based on filename extensions.

### Artificial Intelligence & ML

- [Log Formatting](https://awesome-repositories.com/f/artificial-intelligence-ml/text-to-speech/log-formatting.md) — Formats log messages for text-to-speech compatibility and reduces verbosity during large operations. ([source](https://github.com/ouch-org/ouch/wiki/Accessibility))

### Operating Systems & Systems Programming

- [Multi-Threaded Compression Engines](https://awesome-repositories.com/f/operating-systems-systems-programming/multi-threaded-compression-engines.md) — Distributes compression workloads across multiple CPU cores to increase data throughput.

### User Interface & Experience

- [Accessibility Modes](https://awesome-repositories.com/f/user-interface-experience/accessibility-modes.md) — Provides a dedicated mode that simplifies terminal output for users relying on screen readers. ([source](https://github.com/ouch-org/ouch/blob/main/CHANGELOG.md))
- [Screen Reader Optimizations](https://awesome-repositories.com/f/user-interface-experience/accessible-interface-design/screen-reader-optimizations.md) — Optimizes command results for screen readers by stripping non-essential details for improved clarity. ([source](https://github.com/ouch-org/ouch/wiki/Accessibility))
- [Terminal Accessibility Tools](https://awesome-repositories.com/f/user-interface-experience/terminal-accessibility-tools.md) — Provides simplified command output and screen reader optimizations for users relying on assistive technologies.
