Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flofriday/compressions
Playing with compression algorithms
https://github.com/flofriday/compressions
Last synced: 1 day ago
JSON representation
Playing with compression algorithms
- Host: GitHub
- URL: https://github.com/flofriday/compressions
- Owner: flofriday
- License: mit
- Created: 2020-07-12T13:25:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T12:35:00.000Z (over 4 years ago)
- Last Synced: 2023-03-05T01:47:57.069Z (almost 2 years ago)
- Language: Go
- Size: 309 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# compressions
Playing with compression algorithms## LZSS
![screenshot](screenshot.png)This implementation uses 12 bit for the lookback and 4 bit for the length.
At the moment it uses sequential search.
Beginning with the 1st byte, every ninth byte is a bit-mask to indicate which
bytes are values and which bytes are the pointers to previous values.### Run the code
* Compile the code `go build lzss.go`
* Compress a test file `./lzss -i testdata/RomeoAndJuliet.txt -o RJ.bin --compress --verbose`
* Decompress the file again `./lzss -i RJ.bin -o RJ.txt --decompress --verbose`All options:
```
Usage: lzss --input INPUT --output OUTPUT [--compress] [--decompress] [--verbose]Options:
--input INPUT, -i INPUT
--output OUTPUT, -o OUTPUT
--compress, -c
--decompress, -d
--verbose, -v
--help, -h display this help and exit
```### Resources
* http://wiki.xentax.com/index.php/LZSS
* http://michael.dipperstein.com/lzss/