A command-line utility for compressing files using gzip or zip formats.
- Rust (to compile the source code)
- Cargo (Rust's package manager)
-
Clone the repository:
git clone https://github.com/username/compress.git cd compress
-
Compile the project:
cargo build --release
-
You can run the project execute .install.sh or
-
Copy the compiled binary to the
/opt/compress
directory:sudo mkdir -p /opt/compress sudo cp target/release/compress /opt/compress/ sudo chmod +x /opt/compress/compress
-
Add an alias to your
.bashrc
:echo "alias compress='/opt/compress/compress'" >> ~/.bashrc source ~/.bashrc
-
-
Verify the installation:
compress --help
The program supports two compression types: gzip and zip.
-
Gzip compression:
compress gzip source.txt source.txt.gz
-
Zip compression:
compress zip source.txt source.zip
To see the usage options:
compress --help
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
`This project is licensed under the terms of the MIT license.