{"id":18498455,"url":"https://github.com/zircote/bloom","last_synced_at":"2025-04-09T00:31:18.163Z","repository":{"id":3767222,"uuid":"4843788","full_name":"zircote/Bloom","owner":"zircote","description":"a drunken investigation into feasibility of pure php bloom filters","archived":false,"fork":false,"pushed_at":"2013-12-17T01:38:19.000Z","size":424,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T19:45:13.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"openstenoproject/plover","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zircote.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-30T15:59:58.000Z","updated_at":"2021-05-31T14:18:30.000Z","dependencies_parsed_at":"2022-08-22T20:40:40.493Z","dependency_job_id":null,"html_url":"https://github.com/zircote/Bloom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zircote%2FBloom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zircote%2FBloom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zircote%2FBloom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zircote%2FBloom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zircote","download_url":"https://codeload.github.com/zircote/Bloom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949886,"owners_count":21023409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T13:40:12.444Z","updated_at":"2025-04-09T00:31:17.617Z","avatar_url":"https://github.com/zircote.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bloom\n=====\n\n[![Build Status](https://secure.travis-ci.org/zircote/Bloom.png)](http://travis-ci.org/zircote/Bloom)\n\nThis project has morphed from an attempt of 'pure' php bloom filters to a tool\nthat employs `Redis` and `Rediska` as a storage and interface for a distributed\n`Bloom Filter`.\n\nBy utilizing the power of redis' `SETBIT` and `GETBIT` we are able to create a\nsimple, powerful and lightweight bloomfilter. The ability of redis to create a\nBITSET that is practically endless in size _512MB_ the index limitations afforded\nus is huge. PHP_INT_MAX serves well as a line in the sand in this early stage of\ntesting and research. This potentially results in a 3% false positive rate for\n10b values given sufficient number of hashing buckets. (I am performing more on\nthese numbers before I get overly confident on these findings.)\n\nRead Times on Benchmarks: 0.0011499519820647/s with three key hashing using a\nword list of 27607 unique strings.\n\nAdd Times on benchmark tests: 0.0036964981654479/s with three key hashing using\na word list of 27607 unique strings.\n\n\n```php\n\u003c?php\nuse Bloom\\Filter,\n    Bloom\\Hash\\HashMix,\n    Bloom\\Hash\\Murmur,\n    Rediska;\n\n/* Create the Filter */\n$filter = new Filter();\n/* Inject Rediska */\n$filter-\u003esetRediska(new Rediska());\n/* Inject the Hash Class */\nif(extension_loaded('murmurhash')){\n    $filter-\u003esetHash(new Murmur());\n} else {\n    $filter-\u003esetHash(new HashMix());\n}\n\n/* Add items to the filter */\n$filter-\u003eadd('some random text');\n$filter-\u003eadd(array('or add','an array of elements'));\n\n/* Check the filter */\nvar_dump($filter-\u003econtains('some random text'));\n// bool(true)\n\nvar_dump($filter-\u003econtains('or add'));\n// bool(true)\n\nvar_dump($filter-\u003econtains('This is not in the filter'));\n// bool(false)\n\n\nvar_dump($filter-\u003econtains(array('or add','an array of elements')));\n// bool(true)\n\nvar_dump($filter-\u003econtains(array('NO','or add','an array of elements')));\n// bool(false)\n\n```\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/zircote/bloom/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzircote%2Fbloom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzircote%2Fbloom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzircote%2Fbloom/lists"}