Function brotli2::raw::compress_buf[][src]

pub fn compress_buf(
    params: &CompressParams,
    input: &[u8],
    output: &mut &mut [u8]
) -> Result<usize, Error>

Compresses the data in input into output.

The output buffer is updated to point to the exact slice which contains the output data.

If successful, the amount of compressed bytes are returned (the size of the output slice), or an error is returned. The output buffer being too small is considered to be an error.