{"id":18674115,"url":"https://github.com/nervosnetwork/golomb-coded-set","last_synced_at":"2026-03-02T04:02:04.409Z","repository":{"id":44721232,"uuid":"251356706","full_name":"nervosnetwork/golomb-coded-set","owner":"nervosnetwork","description":"Golomb-Coded Set","archived":false,"fork":false,"pushed_at":"2024-04-11T10:17:08.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T17:55:14.891Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nervosnetwork.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-30T16:02:17.000Z","updated_at":"2024-07-18T14:12:13.000Z","dependencies_parsed_at":"2024-11-07T09:17:36.488Z","dependency_job_id":"c45d2146-f7c2-4a66-b2d5-5b01608529e4","html_url":"https://github.com/nervosnetwork/golomb-coded-set","commit_stats":null,"previous_names":["thewawar/golomb-coded-set"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nervosnetwork/golomb-coded-set","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgolomb-coded-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgolomb-coded-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgolomb-coded-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgolomb-coded-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervosnetwork","download_url":"https://codeload.github.com/nervosnetwork/golomb-coded-set/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fgolomb-coded-set/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29992286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"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":[],"created_at":"2024-11-07T09:17:32.789Z","updated_at":"2026-03-02T04:02:04.380Z","avatar_url":"https://github.com/nervosnetwork.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golomb-Coded Set\n\nAn implementation of BIP158 Golomb-Coded Set data structure.\n\nNOTE: The code is mainly copy from [rust-bitcoin](https://github.com/rust-bitcoin/rust-bitcoin/blob/a148e0673665a099d2771bf9c2dcf3402b75e7de/src/util/bip158.rs) project.\n\n## How to choose parameters?\n\n```\ncd golomb-loss\ncargo run --release\n```\n\nThe output:\n```\n========\n\u003e\u003e Reference: https://gist.github.com/sipa/576d5f09c3b86c3b1b75598d799fc845\n--------\n P : the bit parameter of the Golomb-Rice coding\n M : 1.497137 * (2**P)\n N : how many items in filter\n bits/item : average bits cost for one item =\u003e log2(eM) - log2(2πN)/(2N)\n bits/item(real) : real(random items [u8;32]) average bits cost for one item\n false-positive-rate: 1.0/M\n========\n\n # P=10, M=    1533, false-positive-rate=0.0006522867\nN=10    , bits/item=11.7262, bits/item(real)=18.4000, build-filter-cost=6.926µs\nN=100   , bits/item=11.9784, bits/item(real)=12.7200, build-filter-cost=24.154µs\nN=1000  , bits/item=12.0186, bits/item(real)=12.1120, build-filter-cost=246.224µs\nN=10000 , bits/item=12.0241, bits/item(real)=12.0600, build-filter-cost=2.978371ms\nN=100000, bits/item=12.0248, bits/item(real)=12.0539, build-filter-cost=35.731131ms\n\n # P=15, M=   49058, false-positive-rate=0.0000203840\nN=10    , bits/item=16.7262, bits/item(real)=23.2000, build-filter-cost=6.117µs\nN=100   , bits/item=16.9784, bits/item(real)=17.7600, build-filter-cost=4.960362ms\nN=1000  , bits/item=17.0186, bits/item(real)=17.1120, build-filter-cost=302.957µs\nN=10000 , bits/item=17.0241, bits/item(real)=17.0600, build-filter-cost=2.626318ms\nN=100000, bits/item=17.0248, bits/item(real)=17.0537, build-filter-cost=34.169061ms\n\n # P=19, M=  784931, false-positive-rate=0.0000012740\nN=10    , bits/item=20.7262, bits/item(real)=27.2000, build-filter-cost=6.692µs\nN=100   , bits/item=20.9784, bits/item(real)=21.7600, build-filter-cost=43.907µs\nN=1000  , bits/item=21.0186, bits/item(real)=21.1120, build-filter-cost=310.448µs\nN=10000 , bits/item=21.0241, bits/item(real)=21.0600, build-filter-cost=2.696983ms\nN=100000, bits/item=21.0248, bits/item(real)=21.0537, build-filter-cost=34.340566ms\n\n # P=20, M= 1569862, false-positive-rate=0.0000006370\nN=10    , bits/item=21.7262, bits/item(real)=28.8000, build-filter-cost=6.392µs\nN=100   , bits/item=21.9784, bits/item(real)=22.7200, build-filter-cost=44.985µs\nN=1000  , bits/item=22.0186, bits/item(real)=22.1120, build-filter-cost=322.643µs\nN=10000 , bits/item=22.0241, bits/item(real)=22.0600, build-filter-cost=2.801545ms\nN=100000, bits/item=22.0248, bits/item(real)=22.0537, build-filter-cost=32.687121ms\n\n # P=25, M=50235582, false-positive-rate=0.0000000199\nN=10    , bits/item=26.7262, bits/item(real)=33.6000, build-filter-cost=6.894µs\nN=100   , bits/item=26.9784, bits/item(real)=27.7600, build-filter-cost=46.113µs\nN=1000  , bits/item=27.0186, bits/item(real)=27.1120, build-filter-cost=327.462µs\nN=10000 , bits/item=27.0241, bits/item(real)=27.0600, build-filter-cost=2.868482ms\nN=100000, bits/item=27.0248, bits/item(real)=27.0537, build-filter-cost=35.875129ms\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fgolomb-coded-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervosnetwork%2Fgolomb-coded-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fgolomb-coded-set/lists"}