Download the PHP package pleonasm/bloom-filter without Composer

On this page you can find all versions of the php package pleonasm/bloom-filter. 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 bloom-filter

A Bloom Filter for PHP

This is a well tested implementation of a Bloom Filter for PHP. It has the following features:

  1. Efficient memory use for bit array (as efficient as PHP can be anyway).
  2. A way to get a raw version of the filter for transport to other systems.
  3. Ability to restore said raw filter back into a usable one.
  4. Auto-calculates optimal hashing and bit array size based on desired set size and false-positive probability.
  5. Auto-generates hashing functions as needed.

Installation

Install via Composer (make sure you have composer in your path or in your project).

Put the following in your package.json:

Run composer install.

Usage

Warnings On Serialization

As a note: using json_encode() on a bloom filter object should work across most systems. You can run in to trouble if are moving the filter between 64 and 32 bit systems (that will outright not work) or moving between little-endian and big-endian systems (that should work, but I haven't tested it).

Also note that json_encode() will take the binary bit array and base64 encode it. So if you have a large array, it will get about 33% bigger on serialization.

Other Notes

Under the hood, the hashing mechanism used is actually an HMAC of whatever algorithm you pick. In general, PHP's hash extension is not happy if you pick a non-cryptographically secure algo to calculate an HMAC so just don't do it with this library and everything will work just fine.

This may not come up if you're using PHP 7.1 specifically, but generally the hash you use must output at least 64 bits. Things like adler32 or crc32 not okay to use even if they don't throw an error in PHP 7.1.

Requirements

This project requires PHP 7.1 or newer. That said, version 1.0.2 of bloom-filter is available for PHP 5.4 to 7.0 and will work just fine.

License

You can find the license for this code in the LICENSE file.


All versions of bloom-filter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 pleonasm/bloom-filter contains the following files

Loading the files please wait ....