Skip to main content

A library for inflating and deflating LZSS (Lempel, Ziv, Storer, Szymanski) buffers.

Project description

lzsslib

Build PyPI Snyk License: GPL v3

Lzsslib is an small library for inflating and deflating LZSS (Lempel, Ziv, Storer, Szymanski) buffers.

The LZSS format is originally described in a paper titled "Data Compression via Textual Substitution" published in Journal of the ACM, 29(4):928-951, 1982 by J.A. Storer and T.G. Szymanski.

Installing

Install and update using pip:

$ pip install -U lzsslib

Usage

The following example shows how to decompress a file using default options.

from pathlib import Path
from lzsslib.decompress import LzssDecompressor

# Create a decompressor object with default options
decomp = LzssDecompressor()

# Open an input and output files
fin = Path('input.lzss').open(mode='rb')
fout = Path('output.bin').open(mode='wb')

# Read the input, decompress and write
while (buffer := fin.read(1024)):
    out = decomp.decompress(buffer, remaining_size)
    fout.write(out)

# Ensure output is written and close
fout.flush()
fin.close()
fout.close()

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lzsslib-0.0.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lzsslib-0.0.5-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file lzsslib-0.0.5.tar.gz.

File metadata

  • Download URL: lzsslib-0.0.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lzsslib-0.0.5.tar.gz
Algorithm Hash digest
SHA256 50097b71157516d557c7cee2c073a7eaaa63ef5fc647bda553849c72045e7a79
MD5 33f9f114b28a002dcfa66a6eef04b035
BLAKE2b-256 a50aa4b4e58780ecf622c0f879c825c474b8460c248bff56f10939c0ada83a53

See more details on using hashes here.

Provenance

The following attestation bundles were made for lzsslib-0.0.5.tar.gz:

Publisher: build.yml on antoniovazquezblanco/lzsslib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lzsslib-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: lzsslib-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lzsslib-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 132eba0077d9cbd49a70415e3657d0f9d3dc07a59b6335efcf246ad60b0a81a3
MD5 77e6a79f9fc19c36c000b8cfb1770d2c
BLAKE2b-256 4205596b0986076a0731e85d83290b09454e62be668413a864548e11861f5f47

See more details on using hashes here.

Provenance

The following attestation bundles were made for lzsslib-0.0.5-py3-none-any.whl:

Publisher: build.yml on antoniovazquezblanco/lzsslib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page