INNER CODE UNIT · Rust
rewrite_create_body
Augani/dory · dory-core/ffi/src/lib.rs:41
pub fn rewrite_create_body(body: Vec<u8>, gpu_supported: bool) -> RewriteResult {
match dory_dataplane::rewrite_create_body(&body, &dory_dataplane::RewriteOpts { gpu_supported })
{
Ok(out) => RewriteResult {
ok: true,
body: out,
error: String::new(),
},
Err(e) => RewriteResult {
ok: false,
body: Vec::new(),
error: e.to_string(),
},
}
}
const MAXIMUM_ZSTD_OUTPUT_BYTES: u64 = 256 * 1024 * 1024;