pub fn tlv_size(typ: u64, value_len: usize) -> usize
Compute the total encoded size of a TLV element without allocating.