🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

github.com/flofriday/compressions

Package Overview
Dependencies
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/flofriday/compressions

Source
Go Modules
Version
v0.0.0-20200715123500-6299e0e3e7c2
Version published
Created
Source

compressions

Playing with compression algorithms

LZSS

screenshot

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/

FAQs

Package last updated on 15 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts