pub(crate) fn deflate(
    input: &[u8],
    settings: &CompressSettings,
) -> Result<Vec<u8>, Error> {
    if settings.btype > 2 {
        Err(Error(61))
    } else if settings.btype == 0 {
        Ok(compress_to_vec(input, 0))
    } else {
        Ok(compress_to_vec(input, 10))
    }
}
/// Compress a buffer with deflate. See RFC 1951.
Compress a buffer with deflate.
Compress a buffer with deflate .
pub(crate) fn deflate(
    input: &[u8],
    settings: &CompressSettings,
) -> Result<Vec<u8>, Error> {
    if settings.btype > 2 {
        Err(Error(61))
    } else if settings.btype == 0 {
        Ok(compress_to_vec(input, 0))
    } else {
        Ok(compress_to_vec(input, 10))
    }
}
pub ( crate ) fn deflate ( input : & [ u8 ] , settings : & CompressSettings , ) -> Result < Vec < u8 > , Error > { if settings . btype > 2 { Err ( Error ( 61 ) ) } else if settings . btype == 0 { Ok ( compress_to_vec ( input , 0 ) ) } else { Ok ( compress_to_vec ( input , 10 ) ) } }
Compress a buffer with deflate.
Compress a buffer with deflate .
input
&[u8]
settings
&CompressSettings