Download the PHP package hichxm/hyperloglog without Composer

On this page you can find all versions of the php package hichxm/hyperloglog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperloglog

HyperLogLog for PHP

Latest Stable Version Supported PHP Versions

Tests

A lightweight and dependency-free PHP implementation of the HyperLogLog probabilistic data structure for approximate cardinality estimation.

HyperLogLog allows you to estimate the number of distinct elements in very large datasets while using only a small, fixed amount of memory.

View on Packagist: hichxm/hyperloglog

Features

When to Use HyperLogLog

HyperLogLog is well suited for:

It is not appropriate when an exact distinct count is required.

Requirements

Note: The xxh3 and xxh128 hash algorithms are available only when supported by your PHP version and build. If unavailable, you can use any other algorithm returned by hash_algos(), such as sha256, sha512, or md5.

Installation

Install via Composer:

Basic Usage

The returned value is an approximation of the number of unique elements.

Constructor

Parameters

Parameter Description
counterBits Number of bits used to select registers. The number of registers is 2^counterBits.
hashAlgorithm Any hashing algorithm supported by PHP's hash() function.

Increasing counterBits improves accuracy while increasing memory usage.

Example:

Accuracy

The theoretical standard error is:

where:

Example:

Supported Hash Algorithms

Any algorithm supported by PHP can be used.

Examples include:

You can list available algorithms using:

Public API

Add an element

Estimate the number of distinct values

Calculate the theoretical error

Measure estimation error

References

License

MIT


All versions of hyperloglog with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^7.1|^7.2|^7.3|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4|^8.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hichxm/hyperloglog contains the following files

Loading the files please wait ...