{"id":18578978,"url":"https://github.com/patrickmn/go-bitset","last_synced_at":"2025-08-19T02:35:45.142Z","repository":{"id":3402849,"uuid":"4452728","full_name":"patrickmn/go-bitset","owner":"patrickmn","description":"Efficient map[uint32|64]bool-like bitset for Go","archived":false,"fork":false,"pushed_at":"2012-07-12T11:08:51.000Z","size":124,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T04:32:09.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://patrickmn.com/projects/go-bitset/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickmn.png","metadata":{"files":{"readme":"README","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":"2012-05-26T04:45:26.000Z","updated_at":"2024-10-21T05:59:11.000Z","dependencies_parsed_at":"2022-08-31T22:26:44.054Z","dependency_job_id":null,"html_url":"https://github.com/patrickmn/go-bitset","commit_stats":null,"previous_names":["pmylund/go-bitset"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmn%2Fgo-bitset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmn%2Fgo-bitset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmn%2Fgo-bitset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmn%2Fgo-bitset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickmn","download_url":"https://codeload.github.com/patrickmn/go-bitset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"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-06T23:38:28.488Z","updated_at":"2025-04-10T10:31:23.247Z","avatar_url":"https://github.com/patrickmn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-bitset is an efficient implementation of a map between unsigned, 32-bit or\n64-bit integers and boolean values. It provides methods for setting, clearing,\nflipping, and testing individual integers.\n\ngo-bitset also provides set intersection, union, difference, complement, and\nsymmetric operations, as well as tests to check whether any, all, or no bits\nare set, and the ability to query the bitset's length and number of set bits.\n\nBitsets are expanded automatically to the size of the largest bit set.\n\n== Installation\n\ngo get github.com/pmylund/go-bitset\n\n== Documentation\n\ngo doc github.com/pmylund/go-bitset\nor http://go.pkgdoc.org/github.com/pmylund/go-bitset\n\n== Usage\n\nimport \"github.com/pmylund/go-bitset\"\n\nb := bitset.New32(10000)\nb.Set(1000)\nif b.Test(1000) {\n\tfmt.Println(\"Bit 1000 is set!\")\n}\nb.Clear(1000)\nb.Set(10)\n\nob := bitset.New32(0)\n// ob expands automatically\nob.Set(10)\n\nif b.Intersection(ob).Count() \u003e 1 {\n\tfmt.Println(\"The two sets intersect!\")\n}\n\noob := bitset.New64(0)\noob.Set(1000000000)\n\ngo-bitset is based on bitset by Will Fitzgerald.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickmn%2Fgo-bitset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickmn%2Fgo-bitset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickmn%2Fgo-bitset/lists"}