Status: Unstable
Warning: This API is kept for backward compatibility. It uses specialized substring semantics and does not match structured sketch interfaces.
Substring-based aggregation sketch for arbitrary string keys.
Coco<H = DefaultXxHasher>CocoBucket
fn new() -> Self
fn init_with_size(w: usize, d: usize) -> Selffn insert(&mut self, key: &str, v: u64)fn estimate(&mut self, partial_key: &str) -> u64
fn estimate_with_udf<F>(&mut self, partial_key: &str, udf: F) -> u64fn merge(&mut self, other: &Coco<H>)Derives serde; no dedicated byte API helpers.
use asap_sketchlib::Coco;
let mut sk = Coco::init_with_size(64, 4);
sk.insert("region=us|id=1", 3);
let _ = sk.estimate("region=us");- Query semantics are substring/UDF based (not exact-key frequency).
- Replacement behavior is probabilistic.
Unstable.