pub(self) fn deflate_encode(
        obj: &impl StrictEncode,
    ) -> Result<Vec<u8>, Error> {
        // We initialize writer with a version byte, indicating deflation
        // algorithm used
        let writer = vec![Self::RAW_DATA_ENCODING_DEFLATE];
        let mut encoder = DeflateEncoder::new(writer, Compression::Best);
        obj.strict_encode(&mut encoder)?;
        Ok(encoder.finish().map_err(|_| Error::DeflateEncoding)?)
    }
/// Encoder for v1 of raw data encoding algorithm. Uses deflate
Encoder for v1 of raw data encoding algorithm. Uses deflate
Encoder for v1 of raw data encoding algorithm . Uses deflate
pub(self) fn deflate_encode(
        obj: &impl StrictEncode,
    ) -> Result<Vec<u8>, Error> {
        // We initialize writer with a version byte, indicating deflation
        // algorithm used
        let writer = vec![Self::RAW_DATA_ENCODING_DEFLATE];
        let mut encoder = DeflateEncoder::new(writer, Compression::Best);
        obj.strict_encode(&mut encoder)?;
        Ok(encoder.finish().map_err(|_| Error::DeflateEncoding)?)
    }
pub ( self ) fn deflate_encode ( obj : & impl StrictEncode , ) -> Result < Vec < u8 > , Error > { // We initialize writer with a version byte, indicating deflation // algorithm used let writer = vec ! [ Self RAW_DATA_ENCODING_DEFLATE ] ; let mut encoder = DeflateEncoder :: new ( writer , Compression :: Best ) ; obj . strict_encode ( & mut encoder ) ? ; Ok ( encoder . finish ( ) . map_err ( | _ | Error :: DeflateEncoding ) ? ) }
Encoder for v1 of raw data encoding algorithm.
Encoder for v1 of raw data encoding algorithm .
obj
&impl StrictEncode