pub fn BrotliCompressCustomIo<ErrType, InputType, OutputType, Alloc, MetablockCallback>(
    r: &mut InputType,
    w: &mut OutputType,
    input_buffer: &mut [u8],
    output_buffer: &mut [u8],
    params: &BrotliEncoderParams,
    alloc: Alloc,
    metablock_callback: &mut MetablockCallback,
    unexpected_eof_error_constant: ErrType
) -> Result<usize, ErrType> where
    Alloc: BrotliAlloc,
    MetablockCallback: FnMut(&mut PredictionModeContextMap<InputReferenceMut<'_>>, &mut [Command<SliceOffset>], InputPair<'_>, &mut Alloc),
    InputType: CustomRead<ErrType>,
    OutputType: CustomWrite<ErrType>,