{"id":9830207,"url":"https://github.com/x0rror/go-bloomfilter","last_synced_at":"2025-08-28T16:32:31.507Z","repository":{"id":58946874,"uuid":"525732269","full_name":"x0rror/go-bloomfilter","owner":"x0rror","description":"go-bloomfilter is implemented by Golang which supports in-memory and Redis. Moreover, it’s available for a duration-based rotation.","archived":false,"fork":false,"pushed_at":"2022-11-16T07:34:31.000Z","size":44,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T09:04:42.078Z","etag":null,"topics":["bitset","bloom","bloomfilter","filter","go","golang","redis","rotation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x0rror.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-17T09:59:06.000Z","updated_at":"2024-05-14T02:16:47.000Z","dependencies_parsed_at":"2022-09-10T00:30:58.729Z","dependency_job_id":null,"html_url":"https://github.com/x0rror/go-bloomfilter","commit_stats":null,"previous_names":["x0rworld/go-bloomfilter","x0rror/go-bloomfilter","harry-tw/go-bloomfilter"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/x0rror/go-bloomfilter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x0rror%2Fgo-bloomfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x0rror%2Fgo-bloomfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x0rror%2Fgo-bloomfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x0rror%2Fgo-bloomfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x0rror","download_url":"https://codeload.github.com/x0rror/go-bloomfilter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x0rror%2Fgo-bloomfilter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272523116,"owners_count":24949314,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bitset","bloom","bloomfilter","filter","go","golang","redis","rotation"],"created_at":"2024-05-18T01:55:43.816Z","updated_at":"2025-08-28T16:32:31.217Z","avatar_url":"https://github.com/x0rror.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# go-bloomfilter\n\n![build workflow](https://github.com/x0rworld/go-bloomfilter/actions/workflows/go.yml/badge.svg)\n[![Go Reference](https://pkg.go.dev/badge/github.com/x0rworld/go-bloomfilter.svg)](https://pkg.go.dev/github.com/x0rworld/go-bloomfilter)\n\n[go-bloomfilter] is implemented by Golang which supports in-memory and Redis. Moreover, it’s available for a\nduration-based rotation.\n\n## Resources\n\n- [Documentation]\n- [Examples]\n\n## Features\n\n- [Supporting bitmap]: in-memory and Redis\n- [Rotation]\n\n## Installation\n\n```shell\ngo get github.com/x0rworld/go-bloomfilter\n```\n\n## Quickstart\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"github.com/bits-and-blooms/bloom/v3\"\n\t\"github.com/x0rworld/go-bloomfilter/config\"\n\t\"github.com/x0rworld/go-bloomfilter/factory\"\n\t\"log\"\n)\n\nfunc main() {\n\tm, k := bloom.EstimateParameters(100, 0.01)\n\t// configure factory config\n\tcfg := config.NewDefaultFactoryConfig()\n\t// modify config\n\tcfg.FilterConfig.M = uint64(m)\n\tcfg.FilterConfig.K = uint64(k)\n\t// create factory by config\n\tff, err := factory.NewFilterFactory(cfg)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\t// create filter by factory\n\tf, err := ff.NewFilter(context.Background())\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\t// manipulate filter: Exist \u0026 Add\n\tdata := \"hello world\"\n\texist, err := f.Exist(data)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\t// data: hello world, exist: false\n\tlog.Printf(\"data: %v, exist: %v\\n\", data, exist)\n\terr = f.Add(data)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\t// add data: hello world\n\tlog.Printf(\"add data: %s\\n\", data)\n\texist, err = f.Exist(data)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\t// data: hello world, exist: true\n\tlog.Printf(\"data: %v, exist: %v\\n\", data, exist)\n}\n```\n\nMore examples such as rotation could be found in [Examples].\n\n[go-bloomfilter]: https://github.com/x0rworld/go-bloomfilter\n\n[Examples]: ./example\n\n[Documentation]: https://pkg.go.dev/github.com/x0rworld/go-bloomfilter\n\n[Supporting bitmap]: ./bitmap\n\n[Rotation]: ./filter/rotator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx0rror%2Fgo-bloomfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx0rror%2Fgo-bloomfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx0rror%2Fgo-bloomfilter/lists"}