[][src]Function compu_brotli_sys::BrotliEncoderCompress

pub unsafe extern "C" fn BrotliEncoderCompress(
    quality: c_int,
    lgwin: c_int,
    mode: BrotliEncoderMode,
    input_size: usize,
    input_buffer: *const u8,
    encoded_size: *mut usize,
    encoded_buffer: *mut u8
) -> c_int

Performs one-shot memory-to-memory compression.

Compresses the data in @p input_buffer into @p encoded_buffer, and sets @p *encoded_size to the compressed length.

@note If ::BrotliEncoderMaxCompressedSize(@p input_size) returns non-zero value, then output is guaranteed to be no longer than that.

@param quality quality parameter value, e.g. ::BROTLI_DEFAULT_QUALITY @param lgwin lgwin parameter value, e.g. ::BROTLI_DEFAULT_WINDOW @param mode mode parameter value, e.g. ::BROTLI_DEFAULT_MODE @param input_size size of @p input_buffer @param input_buffer input data buffer with at least @p input_size addressable bytes @param[in, out] encoded_size @b in: size of @p encoded_buffer; \n @b out: length of compressed data written to @p encoded_buffer, or @c 0 if compression fails @param encoded_buffer compressed data destination buffer @returns ::BROTLI_FALSE in case of compression error @returns ::BROTLI_FALSE if output buffer is too small @returns ::BROTLI_TRUE otherwise