https://github.com/elementbound/hashcompress
"What could go wrong?"
https://github.com/elementbound/hashcompress
Last synced: 6 months ago
JSON representation
"What could go wrong?"
- Host: GitHub
- URL: https://github.com/elementbound/hashcompress
- Owner: elementbound
- Created: 2018-11-13T21:52:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T22:57:06.000Z (over 7 years ago)
- Last Synced: 2025-03-12T12:42:06.881Z (about 1 year ago)
- Language: Java
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hashcompress #
A joke algorithm with excellent compression ratio.
## Pros/Cons ##
* Very fast compression
* Compression ratio can be easily improved by increasing block size
* Slow decompression
* Unpacked file might be corrupt*
## Usage ##
```sh
$ mvn clean install
...produce an executable jar
$ java -jar target/hashcompress*.jar
...compress/decompress file
```
## How does it work ##
During compression, the input is split up into blocks of the given size. These go through a hashing algorithm, which produces a fixed size output. Thus, the compression ratio is determined by the block size and the algorithm's output size. Each block's hash is written to the output as-is.
During decompression, the block hashes are read one by one. For each, the decompression 'algorithm' will guess until it finds a block that yields the same hash value and writes it to the output.