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. Seven levels: L1 for speed, L5 for density, L6 adds a word-replacing transform for text, and L7 adds a price-aware parse on top of L6 for the smallest frames (several times slower to compress, about 2% slower to decode).

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.7.1

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.7.1
File Interpreter ABI Platform
streamlz-3.7.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
streamlz-3.7.1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details

Total release size: 5.9 MB

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

Download URL streamlz-3.7.1-py3-none-win_amd64.whl
Size 3.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
a24e8295ecd31a471bdc92e2d6bfe6d61e1e95aa3715962eb7dd8333433022a2
BLAKE2b-256 checksum
How to use checksums
6a7726194007b0826c787f80e7275a131716968a967e59abf7bd9d40b8002bf2
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.7.1-py3-none-manylinux_2_17_x86_64.whl

Download URL streamlz-3.7.1-py3-none-manylinux_2_17_x86_64.whl
Size 2.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
a4a6ccbc8e7e393ae18af53d63dc3ee36edbb2809bb878ebbd88887a6d6ee062
BLAKE2b-256 checksum
How to use checksums
ea44097b3494d9d0f14c8ce95dc4eae6419862333e997c228670b39474ad819f
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.7.1

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