|
1 |
| -# SquirrelZip File Compressor/Archiver CLI Tool |
| 1 | +# SquirrelZip |
2 | 2 |
|
3 |
| -Simple CLI tool for compressing and decompressing files with password. |
| 3 | +SquirrelZip is a powerful command-line file compression and encryption tool written in Go. It provides secure file compression with optional password protection. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- File compression with multiple algorithm support |
| 8 | +- Password-based encryption for compressed files |
| 9 | +- Cross-platform support (Windows, Linux, macOS) |
| 10 | +- Command-line interface |
| 11 | +- Progress tracking and compression ratio reporting |
| 12 | +- Secure file handling with automatic cleanup |
| 13 | + |
| 14 | +# Supported Algorithms |
| 15 | +- Huffman |
| 16 | +- LZMA |
| 17 | + |
| 18 | +## Installation |
| 19 | + |
| 20 | +### Pre-built Binaries |
| 21 | + |
| 22 | +You can download pre-built binaries for your platform from the [Releases](https://github.com/itsfuad/SquirrelZip/releases) page. |
| 23 | + |
| 24 | +### Building from Source |
| 25 | + |
| 26 | +1. Ensure you have Go 1.22 or later installed |
| 27 | +2. Clone the repository: |
| 28 | + ```bash |
| 29 | + git clone https://github.com/itsfuad/SquirrelZip.git |
| 30 | + cd SquirrelZip |
| 31 | + ``` |
| 32 | +3. Build the project: |
| 33 | + ```bash |
| 34 | + go build |
| 35 | + ``` |
4 | 36 |
|
5 | 37 | ## Usage
|
6 | 38 |
|
7 |
| -### Build |
| 39 | +### Compressing Files |
| 40 | + |
| 41 | +```bash |
| 42 | +sq compress [files...] -o [output_dir] -p [password] -a [algorithm] |
| 43 | +``` |
| 44 | + |
| 45 | +Options: |
| 46 | +- `-o`: Output directory (optional) |
| 47 | +- `-p`: Password for encryption (optional) |
| 48 | +- `-a`: Compression algorithm (optional) |
8 | 49 |
|
9 |
| -./build |
| 50 | +### Decompressing Files |
10 | 51 |
|
11 |
| -### Run |
| 52 | +```bash |
| 53 | +sq decompress [file] -o [output_dir] -p [password] |
| 54 | +``` |
| 55 | + |
| 56 | +Options: |
| 57 | +- `-o`: Output directory (optional) |
| 58 | +- `-p`: Password for decryption (required if file was encrypted) |
| 59 | + |
| 60 | +## Development |
| 61 | + |
| 62 | +### Project Structure |
12 | 63 |
|
13 |
| -```./sq -c <file1,file2> -o <outputDir>``` |
14 | 64 | ```
|
15 |
| --v Print version information |
16 |
| --c Input files or directory to be compressed [strings] (Space separated) |
17 |
| --o Output directory for compressed/decompressed files (Optional) |
18 |
| --a Algorithm to use for compression (Optional) [string] |
19 |
| --p Password for encryption (Optional) [string] |
20 |
| --all Read all files in the provided directory (Optional) |
21 |
| --d Input file to decompress [strings] (Space separated) |
22 |
| --h Print help |
| 65 | +SquirrelZip/ |
| 66 | +├── compressor/ # Compression algorithms |
| 67 | +├── encryption/ # Encryption/decryption logic |
| 68 | +├── utils/ # Utility functions |
| 69 | +├── constants/ # Constants and messages |
| 70 | +├── main.go # Main application entry |
| 71 | +└── test_files/ # Test files |
23 | 72 | ```
|
24 |
| -## Examples |
25 | 73 |
|
26 |
| -### Compress |
27 |
| -#### Compress without password: |
28 |
| -```./sq -c file.txt file2.txt``` |
| 74 | +### Building |
| 75 | + |
| 76 | +```bash |
| 77 | +# Windows |
| 78 | +build.bat |
| 79 | + |
| 80 | +# Linux/macOS |
| 81 | +go build |
| 82 | +``` |
| 83 | + |
| 84 | +### Testing |
| 85 | + |
| 86 | +```bash |
| 87 | +# Windows |
| 88 | +test.bat |
| 89 | +testRun.bat |
| 90 | +testRunNopass.bat |
| 91 | + |
| 92 | +# Linux/macOS |
| 93 | +go test ./... |
| 94 | +``` |
29 | 95 |
|
30 |
| -#### Compress with password: |
31 |
| -```./sq -c file.txt file2.txt -p mySecurepass1234``` |
| 96 | +## License |
32 | 97 |
|
33 |
| -#### Or compress the whole directory: |
34 |
| -```./sq -all folder``` |
| 98 | +This project is licensed under the terms specified in the LICENSE file. |
35 | 99 |
|
36 |
| -#### To provide an output path use the `-o` flag: |
37 |
| -```./sq -c file.txt -o output/files``` |
| 100 | +## Contributing |
38 | 101 |
|
39 |
| -### Decompress without password: |
40 |
| -```./sq -d compressed.sq``` |
| 102 | +1. Fork the repository |
| 103 | +2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
| 104 | +3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
| 105 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 106 | +5. Open a Pull Request |
41 | 107 |
|
42 |
| -### Decompress with password: |
43 |
| -```./sq -d compressed.sq -p mySecurepass1234``` |
| 108 | +## Acknowledgments |
44 | 109 |
|
45 |
| -### Compression Algorithms |
46 |
| -```./sq -c file.txt -a huffman``` |
47 |
| -```./sq -c file.txt -a lzma``` |
| 110 | +- Built with Go |
| 111 | +- Uses standard library compression algorithms |
| 112 | +- Implements secure encryption for file protection |
0 commit comments