Expand description
Safe, idiomatic Rust bindings for Apache DataSketches,
built via the cxx crate over the raw
apache-datasketches-sys bridge.
default = [] — no sketch family is compiled in unless you opt into its
Cargo feature explicitly:
hll(featurehll) — HyperLogLog cardinality estimation (sketch + union).theta(featuretheta) — cardinality estimation plus set operations: union, intersection, a-not-b, and Jaccard similarity.cpc(featurecpc) — Compressed Probabilistic Counting cardinality estimation with a more compact serialized form (sketch + union only; no set operations beyond union).tuple(featuretuple) — Tuple sketches, in two shapes. The ArrayOfDoubles form carries a fixed-width array off64per distinct key (summed on collision); the generic form intuple::genericcarries a summary type you define in Rust. Both support union, intersection, a-not-b, and Jaccard similarity.
(Module-level docs for each feature are only linked above when built
with that feature enabled — see hll/theta/cpc/tuple in the
sidebar, or build with --all-features to see all four at once.)
See each module’s documentation for usage examples, or the crate’s
examples/ directory for complete runnable demos.
Re-exports§
pub use error::SketchError;
Modules§
- cpc
- CPC (Compressed Probabilistic Counting) sketch family: cardinality estimation with a more compact serialized form than HLL or Theta.
- error
- The single error type shared across every sketch family in this crate.
- hll
- HyperLogLog (HLL) cardinality estimation.
- theta
- Theta sketch family: cardinality estimation plus set operations (union, intersection, a-not-b) and Jaccard similarity.
- tuple
- ArrayOfDoubles Tuple sketch family: cardinality estimation where each
retained key also carries a fixed-width array of
f64values, summed on collision.