pub fn write_tpc_to_vec(tpc: &Tpc) -> Result<Vec<u8>, TpcBinaryError>
Serializes TPC data to a byte vector.