Skip to main content

streamlz

GPU LZ77 codec with CUDA and Vulkan backends. Decodes 2-3x faster than nvCOMP at equal or better compression ratio.

pip install streamlz
import streamlz

c = streamlz.Compressor()            # CUDA if present, else Vulkan
frame = c.compress(data, level=5)
back  = c.decompress(frame)
assert back == data

One Compressor handles both directions. Six levels: L1 for speed, L5 for density, L6 adds a word-replacing transform for text.

Backends

Both produce byte-identical frames, so a frame written by one decodes on the other.

streamlz.available_backends()          # e.g. ['cuda', 'vulkan']
c = streamlz.Compressor(backend="vulkan")

from streamlz import cuda, vulkan      # or import one directly
Backend Needs
CUDA NVIDIA driver, compute capability 8.0+ (RTX 30-series and up)
Vulkan Vulkan 1.2+ device with subgroup size 32: NVIDIA Turing+, AMD RDNA1+, Intel UHD/Iris/Arc

Neither needs a CUDA Toolkit or Vulkan SDK installed - the shared libraries ship in the wheel and only the driver is required at runtime. There is no CPU fallback: no GPU means no codec.

Device-to-device

Callers already holding GPU memory can skip the host round trip entirely, which is where the headline throughput lives:

c.compress_d2d(d_src, src_size, d_dst, dst_capacity, level=5)
c.decompress_d2d(d_frame, frame_size, d_dst, dst_capacity)

Notes

The first run on a new machine compiles the embedded GPU kernels for your card and the driver caches the result - about 140 ms cached against roughly 3.5 seconds uncached. In a container or CI runner where that cache cannot persist, point CUDA_CACHE_PATH at a writable directory that survives between runs.

Apache 2.0. Source, benchmarks and the wire-format spec: https://github.com/StreamLZ/Compressor-GPU

Metadata

Release files for streamlz 3.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for streamlz 3.6.0
File Interpreter ABI Platform
streamlz-3.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
streamlz-3.6.0-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details

Total release size: 5.1 MB

Release files / streamlz-3.6.0-py3-none-win_amd64.whl

Download URL streamlz-3.6.0-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
71ce56830f8cf9ebf6c0a495ddadc9ec42127359f48720563c4efd7a131bfd0b
BLAKE2b-256 checksum
How to use checksums
32a4050a015fe0a188d060326bc83cefd1f1322209ac4de9af655ecce7cfe63b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / streamlz-3.6.0-py3-none-manylinux_2_17_x86_64.whl

Download URL streamlz-3.6.0-py3-none-manylinux_2_17_x86_64.whl
Size 2.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
020ff22891e6ab0ca1b46e30cfc7d59c91d09cf6590f1dc202bb27748f5ad397
BLAKE2b-256 checksum
How to use checksums
57bbbd1b7f89d488cce80ad2766818191408d57bf54abafa684686c87a7af46c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for streamlz 3.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page