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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamlz-3.7.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| streamlz-3.7.0-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.0-py3-none-win_amd64.whl
| Download URL | streamlz-3.7.0-py3-none-win_amd64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
616279340ecabe4692de2dde961edbcfc37828e4a33b281b5e00a468fa6e3120
|
|
BLAKE2b-256 checksum How to use checksums |
f8faab33891ae0064671d44498c47577b808223a990f6c0543ebe65043c8e71f
|
| 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.0-py3-none-manylinux_2_17_x86_64.whl
| Download URL | streamlz-3.7.0-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 |
acb9a8f2a4cd428df2451d2501c34ffaa8d2855ec362389e77b5ac875fa28e37
|
|
BLAKE2b-256 checksum How to use checksums |
56fed4c214387319d7b6e10b9b279a3c92e37c87b1b7fadd8d0848e902db91c1
|
| 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.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.