Skip to main content

compress_for_size

Function compress_for_size 

Source
pub fn compress_for_size(input: &[u8]) -> Result<BytesGatherer>
Expand description

Compress using brotli (small). Use for post storage (compress once, read many).

Falls back to verbatim (version 0) if:

  • input is below the minimum threshold, or
  • the compressed form would not be smaller than the original.