INNER CODE UNIT · Rust
decompress_zstd_bounded
Augani/dory · dory-core/ffi/src/lib.rs:73
pub fn decompress_zstd_bounded(
body: Vec<u8>,
maximum_output_bytes: u64,
) -> BoundedDecompressionResult {
match decompress_zstd_bounded_inner(&body, maximum_output_bytes) {
Ok(output) => BoundedDecompressionResult {
ok: true,
body: output,
error: String::new(),
},
Err(error) => BoundedDecompressionResult {
ok: false,
body: Vec::new(),
error,
},
}
}