I continue to explore the openfhe codebase and am looking at using Compress and/or ModReduce to reduce Ciphertext size (for network transmission or on-disk storage). However my simple test code (in Python) is not showing a reduction in size. Am I doing something wrong?
Can you try the method compress as follows: compciphertext = cc->Compress(ciphertext, 1); // where the second argument specifies the number of limbs to keep in the result ciphertext
@Caesar the Compress function does not seem to be available for this object.
$ ./batesste-openfhe.py
Traceback (most recent call last):
File "/home/batesste/Projects/batesste-openfhe/./batesste-openfhe.py", line 107, in <module>
main(args)
File "/home/batesste/Projects/batesste-openfhe/./batesste-openfhe.py", line 67, in main
compciphertext = cc.Compress(ciphertext, 1)
^^^^^^^^^^^
AttributeError: 'openfhe.CryptoContext' object has no attribute 'Compress'
@Caesar how odd. I do have the latest openFHE installed. Did you run your example in openfhe-python? Is it possible the python bindings have not been updated to include compress? I would assume that should happen automatically using the pybind11 tooling.
@Caesar I did some digging and it definintely looks like this method is not implemented in the python. Can you confirm and then we can open an issue for this in openfhe-python.