An efficient lossless data compression algorithm implementation
Lempel-Ziv-Storer-Szymanski (LZSS) algorithm is the variation of Lempel-Ziv (LZ77) algorithm, which optimizes space storage for binary numbers. LZSS algorithm is a prefix-free algorithm which means there're no common prefix for all code words.
LZSS algorithm is a sliding window based algorithm. It includes the lookup buffer size (the size after current cursor) and dictionary size (the size before current cursor)
LZSS algorithm can be used in many applications, such as gzip, PKZIP etc.
The project is the implementation includes:
- encoder : encode(compress) data into binary number
- decoder : decode(unzip) binary number to data
python3 lzss_encoder.py <inputfile> <D> <B>
D is the dictionary size, B is the buffer size. For example, assuming the Sliding window size is 10, and D = 6, B = 4.
The input file can be tested from the file generated by decoder output_lzss_decoder.txt
pyhton3 lzss_decoder.py <inputfile>
The input file can be tested by the file generated from encoder output_lzss_encoder.txt