From b93c23e5f87b29b3519712ae8071f435d9cf207a Mon Sep 17 00:00:00 2001 From: Titouan Tanguy Date: Thu, 19 Sep 2024 13:52:40 +0200 Subject: [PATCH] feat(integer): add raw parts API to integer CompressionPrivateKeys --- tfhe/src/integer/compression_keys.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tfhe/src/integer/compression_keys.rs b/tfhe/src/integer/compression_keys.rs index ded80e53be..57ddf46484 100644 --- a/tfhe/src/integer/compression_keys.rs +++ b/tfhe/src/integer/compression_keys.rs @@ -49,6 +49,17 @@ impl CompressedDecompressionKey { } } +impl CompressionPrivateKeys { + pub fn into_raw_parts(self) -> crate::shortint::list_compression::CompressionPrivateKeys { + let Self { key } = self; + key + } + + pub fn from_raw_parts(key: crate::shortint::list_compression::CompressionPrivateKeys) -> Self { + Self { key } + } +} + impl CompressionKey { pub fn into_raw_parts(self) -> crate::shortint::list_compression::CompressionKey { let Self { key } = self;