From b343e7872c3a4f64b20b83c800df56d00c2d3e78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vin=C3=ADcius=20Miguel?= <36349314+vrmiguel@users.noreply.github.com> Date: Wed, 24 Mar 2021 19:04:14 -0300 Subject: [PATCH] Update README.md --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5cda38f..001f0a1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ouch (_work in progress_) -`ouch` is the Obvious Unified Compression (and decompression) Helper. +`ouch` is the Obvious Unified Compression (_and decompression_) Helper. | Supported formats | .tar | .zip | .tar.{.lz*,.gz, .bz} | .zip.{.lz*, .gz, .bz*} | .bz | .gz | .lz, .lzma | @@ -37,22 +37,24 @@ OPTIONS: $ ouch -i file{1..5}.zip another_file.tar.gz yet_another_file.tar.bz ``` -When no output file is supplied, `ouch` infers that it must decompress all of its input files. This will error if any of the input files are not decompressible. +When no output file is supplied, `ouch` infers that it must decompress all of its input files into the current folder. This will error if any of the input files are not decompressible. #### Decompressing a bunch of files into a folder ```bash -$ ouch -i file{1..5}.tar.gz -o some-folder -# Decompresses file1.tar.gz, file2.tar.gz, file3.tar.gz, file4.tar.gz and file5.tar.gz to some-folder +$ ouch -i file{1..3}.tar.gz videos.tar.bz2 -o some-folder +# Decompresses file1.tar.gz, file2.tar.gz, file3.tar.gz and videos.tar.bz2 to some-folder # The folder `ouch` saves to will be created if it doesn't already exist ``` -When the output file is not a compressed file, `ouch` will check if all input files are decompressible and infer that it must decompress them into the output file. +When the output file is not a compressed file, `ouch` will check if all input files are decompressible and infer that it must decompress them into the output folder. #### Compressing files ```bash $ ouch -i file{1..20} -o archive.tar +$ ouch -i Videos/ Movies/ -o media.tar.lzma +$ ouch -i src/ Cargo.toml Cargo.lock -o my_project.tar.gz ``` ### Error scenarios @@ -66,6 +68,15 @@ error: file 'some-file' is not decompressible. `ouch` cannot infer `some-file`'s compression format since it lacks an extension. Likewise, `ouch` cannot infer that the output file given is a compressed file, so it shows the user an error. +```bash +$ ouch -i file other-file -o files.gz +error: cannot compress multiple files directly to Gzip. + Try using an intermediate archival method such as Tar. + Example: filename.tar.gz +``` + +Similar errors are shown if the same scenario is applied to `.lz/.lzma` and `.bz/.bz2`. + ## Installation ### Runtime dependencies @@ -108,3 +119,15 @@ cd ouch && cargo run --release ``` I also recommend stripping the release binary. `ouch`'s release binary (at the time of writing) only takes up a megabyte in space when stripped. + +## Supported operating systems + +`ouch` _should_ be cross-platform but is currently only tested (and developed) on Linux, on both x64-64 and ARM. + +## Limitations + +`ouch` does encoding and decoding in-memory, so decompressing very large files with `ouch` is not advisable. + +## Contributions + +Any contributions and suggestions are welcome! -- 2.11.4.GIT