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

#696 in Algorithms

Download history 284/week @ 2024-12-13 136/week @ 2024-12-20 69/week @ 2024-12-27 292/week @ 2025-01-03 333/week @ 2025-01-10 306/week @ 2025-01-17 491/week @ 2025-01-24 588/week @ 2025-01-31 717/week @ 2025-02-07 518/week @ 2025-02-14 727/week @ 2025-02-21 526/week @ 2025-02-28 859/week @ 2025-03-07 699/week @ 2025-03-14 769/week @ 2025-03-21 405/week @ 2025-03-28

2,834 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

~350–570KB
~11K SLoC