Skip to main content

try_decompress_payload

Function try_decompress_payload 

Source
pub fn try_decompress_payload(
    compression_type: u8,
    data: Bytes,
) -> Result<Bytes, Error>
Expand description

Tries to decompress a payload using the given compression type. If the compression type is None, the payload is returned as-is.

ยงErrors

  • If the compression type is not supported
  • If the payload is invalid
  • If the decompression fails