1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Safe, idiomatic Rust bindings for [Apache DataSketches](https://github.com/apache/datasketches-cpp),
//! built via the `cxx` crate over the raw
//! [`apache-datasketches-sys`](https://docs.rs/apache-datasketches-sys) bridge.
//!
//! All four sketch families are enabled by default. To compile only the ones
//! you need, disable default features and name them:
//!
//! ```toml
//! apache-datasketches = { version = "0.2", default-features = false, features = ["hll"] }
//! ```
//!
//! Unused families cost nothing at runtime — the linker drops what you do not
//! call — so opting out buys C++ compile time, not a smaller binary.
//!
//! The families:
//!
//! - `hll` (feature `hll`) — HyperLogLog cardinality estimation (sketch +
//! union).
//! - `theta` (feature `theta`) — cardinality estimation plus set
//! operations: union, intersection, a-not-b, and Jaccard similarity.
//! - `cpc` (feature `cpc`) — Compressed Probabilistic Counting
//! cardinality estimation with a more compact serialized form (sketch +
//! union only; no set operations beyond union).
//! - `tuple` (feature `tuple`) — Tuple sketches, in two shapes. The
//! ArrayOfDoubles form carries a fixed-width array of `f64` per distinct
//! key (summed on collision); the generic form in `tuple::generic` carries
//! 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.)
//!
//! See each module's documentation for usage examples, or the crate's
//! `examples/` directory for complete runnable demos.
// Disabling default features without naming a family leaves nothing behind
// but `SketchError`. That used to compile silently; say so instead.
compile_error!;
pub use SketchError;