pub fn decode_header(data: &[u8]) -> Option<(u8, &[u8])>
Decode header and extract type_id and payload.
Returns (type_id, payload_slice) on success.