pub fn unpack_bytes(data: BytesMut) -> Result<Bytes>Expand description
Unpack a network payload into an owned Bytes buffer.
Uncompressed payloads reuse the existing BytesMut allocation
and freeze it without copying. Compressed payloads allocate a
decompression buffer which is then wrapped as Bytes.