Skip to main content

decompress_blocking

Function decompress_blocking 

Source
pub fn decompress_blocking(
    input: &[u8],
    manifest: &ChunkManifest,
) -> Result<Vec<u8>, CodecError>
Expand description

Sync, runtime-free decompress used by s4-codec-wasm (browser / WASM has no tokio runtime and no spawn_blocking). Same checks as the trait implementation: codec/size match, decompression-bomb cap at manifest.original_size + 1024, crc32c verify after.

Kept in this module (and not duplicated in the wasm crate) so the bomb limit + size + crc rules stay defined exactly once.