Skip to content

Instantly share code, notes, and snippets.

View Infrid's full-sized avatar
🎮

Infrid

🎮
View GitHub Profile
@Infrid
Infrid / lzss.py
Created April 13, 2017 12:49 — forked from nucular/lzss.py
Implementation of the Lempel–Ziv–Storer–Szymanski algorithm in Python
"""
Implementation of the Lempel–Ziv–Storer–Szymanski algorithm, ported from the
C implementation by Haruhiko Okumura
https://oku.edu.mie-u.ac.jp/~okumura/compression/lzss.c
Public Domain
"""
class LZSSBase(object):
def __init__(self, infile, outfile, EI=11, EJ=4, P=1, N=0, F=0, rless=0, init_chr=b' '):
self.infile = infile