pub fn read_compressed_frame(
data: &[u8],
) -> Result<(usize, &[u8]), ProtocolError>Expand description
Decode the inner frame data when compression is enabled.
Returns (uncompressed_size, payload) where:
uncompressed_size == 0means the payload is NOT compresseduncompressed_size > 0means the payload is zlib-compressed
The returned payload is a sub-slice of the input — no allocation or copy.
§Errors
Returns errors for malformed data.