A File Compression software that helps zip/Unzip files using these 2 algorithms:
- Huffmans Code
- Lempel-Ziv-Wells algorithm
The Huffmans algo creates a 1-1 mapping for each byte of the input file and replaces each byte with the mapped bit sequence. For this you need to store a dictionary that describes each 1-1 mapping of input byte and binary sequence.(which needs extraspace)
Unlike Huffmans code LZW dont need an extra dictionary to be saved. Also LZW does not create a mapping to byte to bin sequence. It creates mapping of multiple byte to binary sequence.
- Java 21 or higher
- Maven (for building)
Installing Maven (click to expand)
On macOS:
brew install mavenVerify installation:
mvn -versionI have included the already build jar file. You can run it simply if you dont want to build
java -jar file-compression-2.0-SNAPSHOT-jar-with-dependencies.jarmvn clean package
mvn test
mvn exec:javaAfter building with Maven, you can run the JAR:
java -jar target/file-compression-2.0-SNAPSHOT-jar-with-dependencies.jarI tested this project in: MacOS Tahoe (version 26.0.1)