Currently, there are different methods of compressing files, and for each format, a unique tool is used. However, each tool has different commands and options, making it difficult to use. Therefore, unicom makes it possible to handle various compression formats in a unified interface.
The following is the unicom
help output.
unicom is Universal Compressor
Usage: unicom [OPTIONS] <ARCHIVE_FILE> <FILES>...
Arguments:
<ARCHIVE_FILE> Compressed filename
<FILES>... Target files name
Options:
-d, --decompress Whether to decompress the input
-e, --encrypt Put passwords on compressed files
-f, --format <FORMAT> [default: zip] [possible values: gzip, zip]
-r, --recursive Whether to recursively greet
-v, --verbose Verbose mode
-c, --count <COUNT> Number of compressions to perform [default: 6]
-h, --help Print help
-V, --version Print version
There are several installation methods.
To build the project from source, you need to have Rust installed.
git clone https://github.com/moz-sec/unicom.git && cd unicom
cargo build --release
./target/release/unicom --help
Binaries can be downloaded from the Releases section of this repository. Download and extract the binaries according to your environment.
wget unicom-{version}_{architecture}.tar.gz
tar -zxvf unicom-{version}_{architecture}.tar.gz
If you are on a Mac, you can also install it using brew.
brew install moz-sec/tap/unicom
You can also use the Docker image. unicom's docker repository is here. Put the path containing the files or directories you want to compress in {Host Volume Path}. Mount the container in "/workdir". The compressed file will be created in the {Host Volume Path}. Specify {unicom arguments} for the unicom command.
docker run -it -v {Host Volume Path}:/workdir --rm ghcr.io/moz-sec/unicom:latest {unicom arguments}