15 releases (3 stable)

1.0.2 Jun 6, 2022
1.0.0 Dec 21, 2020
0.0.12 Nov 12, 2019
0.0.11 Jan 24, 2017
0.0.1 Nov 26, 2014

#691 in Algorithms

Download history 288/week @ 2024-12-16 125/week @ 2024-12-23 79/week @ 2024-12-30 296/week @ 2025-01-06 359/week @ 2025-01-13 294/week @ 2025-01-20 550/week @ 2025-01-27 606/week @ 2025-02-03 656/week @ 2025-02-10 536/week @ 2025-02-17 710/week @ 2025-02-24 555/week @ 2025-03-03 828/week @ 2025-03-10 710/week @ 2025-03-17 835/week @ 2025-03-24 337/week @ 2025-03-31

2,759 downloads per month
Used in 3 crates

ISC license

115KB
4K SLoC

hyperloglog

A HyperLogLog implementation in Rust, with bias correction.

Installation: use Cargo:

[dependencies]
hyperloglog = "0"

Usage:

let mut hll = HyperLogLog::new(error_rate);
hll.insert(&"test1");
hll.insert(&"test2");
let card_estimation = hll.len();

let mut hll2 = HyperLogLog::new_from_template(&hll);
hll2.insert(&"test3");

hll.merge(&hll2);

Optional Cargo features:

  • with_serde: enable serialization via serde.

Dependencies

~360–580KB
~11K SLoC