Skip to main content

compress_bound

Function compress_bound 

Source
pub fn compress_bound(src_size: usize) -> usize
Expand description

How large a buffer a compressed block might need, at worst.

This is what to reserve before bulk::compress_to_buffer(), which writes into a destination you provide rather than allocating one.

Re-exported from zstd_safe, where it lives alongside the rest of the direct bindings. Maximum compressed size in worst case single-pass scenario