PHPackages                             mu/bloomfilter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mu/bloomfilter

ActiveLibrary

mu/bloomfilter
==============

redsi布隆过滤器

1.0.0(6y ago)62077MITPHP

Since Nov 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Sparkinzy/redis-bloom-filter)[ Packagist](https://packagist.org/packages/mu/bloomfilter)[ RSS](/packages/mu-bloomfilter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

 bloomfilter
=============

[](#-bloomfilter-)

 redsi布隆过滤器.

Installing
----------

[](#installing)

```
$ composer require mu/bloomfilter -vvv
```

Usage
-----

[](#usage)

使用场景：

- 判断ip是否需要拦截
- 判断用户是否为会员

```
use Mu\Bloomfilter\BloomFilter;

# redis服务器
$redis_conf = [
    'host' => '127.0.0.1',
    'port' => 6379,
    'auth' => 'beauty',
    'timeout'  => 1,
    'database' =>0
];

$bloomfilter = new BloomFilter($redis_conf);
# 设置评论的空间
$bloomfilter->set_bucket('black_ips');
# 添加一个ip
$ip = '127.0.0.1';
$add_rs = $bloomfilter->add($ip);
# 批量添加
$ips = ['192.168.0.1','192.168.0.2'];
$adds_rs = $bloomfilter->multi_add($ips);

# 检查ip
$rs = $bloomfilter->exists($ip);

# 批量检查ip
$multi_rs = $bloomfilter->multi_exists($ips);
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. [胡超博客](http://imhuchao.com/1271.html).

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2365d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16fc8fbed8bb57e44315814548964d441eb425c5b0c8eb16bf036a3e99d960dc?d=identicon)[sparkinzy](/maintainers/sparkinzy)

---

Top Contributors

[![Sparkinzy](https://avatars.githubusercontent.com/u/8643392?v=4)](https://github.com/Sparkinzy "Sparkinzy (4 commits)")

### Embed Badge

![Health badge](/badges/mu-bloomfilter/health.svg)

```
[![Health](https://phpackages.com/badges/mu-bloomfilter/health.svg)](https://phpackages.com/packages/mu-bloomfilter)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
