You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by ti...@apache.org on 2026/02/04 09:53:00 UTC
(datasketches-rust) 02/08: CompressedState and UncompressedState
This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch compression
in repository https://gitbox.apache.org/repos/asf/datasketches-rust.git
commit 568b63cf8f4af3fe8c6092c61c669deeddfc01f7
Author: tison <wa...@gmail.com>
AuthorDate: Wed Feb 4 15:33:22 2026 +0800
CompressedState and UncompressedState
Signed-off-by: tison <wa...@gmail.com>
---
datasketches/src/cpc/compression.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/datasketches/src/cpc/compression.rs b/datasketches/src/cpc/compression.rs
index 11463f6..8d3a15f 100644
--- a/datasketches/src/cpc/compression.rs
+++ b/datasketches/src/cpc/compression.rs
@@ -15,6 +15,22 @@
// specific language governing permissions and limitations
// under the License.
+use crate::cpc::pair_table::PairTable;
+
+pub(super) struct CompressedState {
+ table_data: Vec<u32>,
+ table_data_words: u32,
+ // can be different from the number of entries in the sketch in hybrid mode
+ table_num_entries: u32,
+ window_data: Vec<u32>,
+ window_data_words: u32,
+}
+
+pub(super) struct UncompressedState {
+ table: PairTable,
+ window: Vec<u8>,
+}
+
/// Notice that there are only 65 symbols here, which is different from our usual 8->12 coding
/// scheme which handles 256 symbols.
pub(super) static LENGTH_LIMITED_UNARY_ENCODING_TABLE65: [u16; 65] = [
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org