fn do_decompress()

in client/src/client.rs [322:345]


    fn do_decompress(
        &self,
        body: impl Into<Vec<u8>>,
        headers: &http::HeaderMap,
    ) -> ResponseResult<Vec<u8>> {
        let compress_type = headers.get_str_or_default(&LOG_COMPRESS_TYPE, "");
        if compress_type.is_empty() {
            return Ok(body.into());
        }
        let raw_size = headers.get_i32_or_default(&LOG_BODY_RAW_SIZE, 0);
        if raw_size == 0 {
            return Ok(Vec::new());
        }

        decompress(body.into(), &compress_type, raw_size as usize).map_err(|source| {
            let request_id = headers.get_str(LOG_REQUEST_ID);
            ResponseErrorKind::Decompression {
                source,
                compress_type,
                request_id,
            }
            .into()
        })
    }