Skip to content

Instantly share code, notes, and snippets.

View Infrid's full-sized avatar
🎮

Infrid

🎮
View GitHub Profile
@Infrid
Infrid / emacs.el
Created June 5, 2025 21:14
emacs.el
(require 'package) ;; You might already have this line
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
(add-to-list 'package-archives (cons "melpa" url) t))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
)
;; (package-initialize) ;; You might already have this line
@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