Expand description
Python bindings for s4-codec.
Exposes the CPU codecs (CpuZstd, CpuGzip) and a gpu_available()
helper. GPU codec classes are intentionally NOT exposed in v1.0 — the
nvcomp-gpu cargo feature on this crate forwards to the underlying
s4-codec GPU paths for the server build, but the Python module’s
runtime classes remain CPU-only. See crates/s4-codec-py/README.md
for the rationale; GPU-Python exposure is a v1.x roadmap candidate.
§Async bridge
s4_codec_rs::Codec is async. Python callers expect blocking calls. We
resolve this by running each call on a process-wide multi-thread tokio
runtime stashed in a OnceLock. Python::detach (pyo3 0.26+ name for allow_threads) releases the
GIL across the await so other Python threads can progress while the
blocking compression worker churns.