Search by

maximal / hyperloglog

maximal

Set cardinality estimator using the HyperLogLog algorithm

Package info

github.com/maximal/hyperloglog-php

pkg:composer/maximal/hyperloglog

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0 2026-10-16 11:05 UTC

This package is auto-updated.

Last update: 2026-10-16 11:09:22 UTC


README

Set cardinality estimator using the HyperLogLog algorithm.

Installation

Install the library using Composer:

composer require maximal/hyperloglog

Usage

Add items to the HyperLogLog instance and count the unique items:

$hll = new HyperLogLog();
$hll->add('foo');
$hll->add('bar');
$hll->add('baz');
$hll->add('foo');
$hll->add('baz');
echo 'Unique items: ', $hll->count(), PHP_EOL; // Unique items: 3

Links