Expand description
RFC 1952 gzip codec via flate2 (v0.4 #26).
Why CPU and not GPU: nvCOMP’s GDeflate produces a multi-stream
parallel-decode-friendly format that is not a single valid DEFLATE
stream — wrapping it with a gzip header doesn’t make stock gunzip
decode it. To deliver the actual user-facing value of issue #26 (= “an
S3 object S4 stored that any browser / curl / standard library can
decompress without knowing about S4”), the codec has to emit a real
gzip stream. CPU flate2 is the right tool.
Trade-off: no GPU acceleration on this codec. For wire-compat against
gunzip-aware clients use cpu-gzip; for raw GPU throughput where
everyone speaks S4 use nvcomp-zstd / nvcomp-bitcomp.
Default compression level is 6 — flate2’s default and the same level
gzip(1) uses out of the box. Range 0..=9 (= flate2::Compression range).
Structs§
- CpuGzip
- CPU gzip codec (RFC 1952).
levelclamped to 0..=9.
Functions§
- compress_
blocking - Sync compress sibling of
decompress_blocking. Provided for symmetry. - decompress_
blocking - Sync, runtime-free decompress used by
s4-codec-wasm(browser / WASM has no tokio runtime). Same checks as the trait implementation: codec/size match, decompression-bomb cap atmanifest.original_size + 1024, crc32c verify after.