Ciphertest Size

How can we compute the size of a RadixCiphertest in tfhe-rs?

Dear team, any update on this query?

Hello @divyesh I think the weekend explains the delay :slightly_smiling_face:

If you are interested in the size to store on disk/send to a server you can use bincode::serialize and call len on the Vec of u8 it yields, if you want the in memory size you should use the blocks() method and then add all the lengths of the blocks via

let mut total_len = 0;

for block in radix.blocks() { total_len += block.ct.as_ref().len();}

This is not a perfect measurement but it should be close enough