CompressSafe is a command-line tool for compressing files using gzip, decompressing them, verifying their integrity, and cleaning up temporary decompressed files. It supports processing individual files as well as entire directories, while ignoring already compressed files.
- Download compresssafe.exe
- Run in the commandline
compresssafe.exe -input <path>
compresssafe -input <path>
input
: Specifies the input file or directory path to be processed.
- Compresses files using gzip.
- Decompresses gzip-compressed files.
- Verifies the integrity of decompressed files by comparing checksums.
- Processes directories recursively.
- Skips files that are already compressed.
- Removes temporary decompressed files after processing.
- Go 1.16 or later
- Clone the repository or download the source code.
- Navigate to the directory containing the source code.
- Build the executable for your target operating system.
GOOS=windows GOARCH=amd64 go build -o compresssafe.exe compresssafe.go
- Compression: The tool compresses each file using gzip and appends the .gz extension.
- Decompression: The tool decompresses the compressed file to a temporary directory named decompressed.
- Verification: The tool calculates and compares the SHA-256 checksum of the original file and the decompressed file to ensure they are identical.
- Cleanup: After processing all files, the tool removes the temporary decompressed directory.