pub fn finish(payload: &[u8], codec: Codec) -> Result<Vec<u8>>Expand description
Prepend the outer header, compressing the payload with codec.
§Errors
As compress.
§Panics
If payload is shorter than the header record or its header bytes are
invalid: payload must come from build_payload /
payload_from_topology.