{"id":29151322,"url":"https://github.com/karpeleslab/bitmap","last_synced_at":"2025-09-08T11:10:51.940Z","repository":{"id":134251750,"uuid":"230764808","full_name":"KarpelesLab/bitmap","owner":"KarpelesLab","description":"Bitmap manipulation in Go","archived":false,"fork":false,"pushed_at":"2019-12-29T16:59:05.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T00:09:02.362Z","etag":null,"topics":["bitmap","bitset","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarpelesLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-12-29T14:57:05.000Z","updated_at":"2024-09-12T15:02:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f7d8cd1-d330-49a6-ac32-2388075ebf8b","html_url":"https://github.com/KarpelesLab/bitmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KarpelesLab/bitmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fbitmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fbitmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fbitmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fbitmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarpelesLab","download_url":"https://codeload.github.com/KarpelesLab/bitmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fbitmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274174271,"owners_count":25235203,"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-09-08T02:00:09.813Z","response_time":121,"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":["bitmap","bitset","golang"],"created_at":"2025-07-01T00:09:01.856Z","updated_at":"2025-09-08T11:10:51.913Z","avatar_url":"https://github.com/KarpelesLab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/KarpelesLab/bitmap.svg)](https://travis-ci.org/KarpelesLab/bitmap)\n[![GoDoc](https://godoc.org/github.com/KarpelesLab/bitmap?status.svg)](https://godoc.org/github.com/KarpelesLab/bitmap)\n[![Coverage Status](https://coveralls.io/repos/github/KarpelesLab/bitmap/badge.svg?branch=master)](https://coveralls.io/github/KarpelesLab/bitmap?branch=master)\n\n# Bitmap\n\nSimple bitmaps in Go.\n\nProvides the following methods on bitmap objects:\n\n* Get(bit int)\n* Set(bit int, value bool)\n* Toggle(bit)\n* GetAtomic(bit int)\n* SetAtomic(bit int, value bool)\n* ToggleAtomic(bit int)\n\n## Example\n\n```Go\n\tm := bitmap.New(127)\n\n\tm.Set(42, true)\n\n\tif m.Get(42) {\n\t\t// OK\n\t}\n```\n\n# Why?\n\nThere are already a few bitmap implementations in Go available out there, however they have some shortfalls and/or are too complex for what a bitmap should do.\n\n* [boljen's go-bitmap](https://godoc.org/github.com/boljen/go-bitmap) has separate implementations for Bitmap/Concurrent/Threadsafe, and complexifies a lot what should be very simple.\n* [ShawnMilo's bitmap](https://www.godoc.org/github.com/ShawnMilo/bitmap) has a nice feel but lacks atomic methods and adds string methods using json/gzip/base64 (?)\n* [Roaring Bitmaps](https://godoc.org/github.com/RoaringBitmap/roaring) are simply too complex for what I need bitmaps for. You should however definitely use that if you store more than 200k bits or so in total.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fbitmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarpeleslab%2Fbitmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fbitmap/lists"}