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

#360 in Algorithms

Download history 338/week @ 2024-06-08 251/week @ 2024-06-15 182/week @ 2024-06-22 167/week @ 2024-06-29 166/week @ 2024-07-06 203/week @ 2024-07-13 154/week @ 2024-07-20 333/week @ 2024-07-27 164/week @ 2024-08-03 207/week @ 2024-08-10 170/week @ 2024-08-17 300/week @ 2024-08-24 241/week @ 2024-08-31 245/week @ 2024-09-07 280/week @ 2024-09-14 443/week @ 2024-09-21

1,261 downloads per month
Used in 2 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.

lib.rs:

HyperLogLog implementation for Rust

Dependencies

~340–570KB
~11K SLoC