{"id":18418653,"url":"https://github.com/bsm/bitmap.lua","last_synced_at":"2025-04-07T13:31:21.947Z","repository":{"id":11675325,"uuid":"14185175","full_name":"bsm/bitmap.lua","owner":"bsm","description":"Lua bitmaps (aka bitstrings or bitsets) implemented in C","archived":false,"fork":false,"pushed_at":"2014-03-06T09:56:41.000Z","size":168,"stargazers_count":15,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T19:02:45.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/bsm.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}},"created_at":"2013-11-06T20:49:52.000Z","updated_at":"2025-01-06T11:00:49.000Z","dependencies_parsed_at":"2022-07-15T15:17:30.868Z","dependency_job_id":null,"html_url":"https://github.com/bsm/bitmap.lua","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/bsm%2Fbitmap.lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbitmap.lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbitmap.lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fbitmap.lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsm","download_url":"https://codeload.github.com/bsm/bitmap.lua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661672,"owners_count":20975098,"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-06T04:14:13.705Z","updated_at":"2025-04-07T13:31:21.591Z","avatar_url":"https://github.com/bsm.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Bitmap.lua\n\nLua bitmaps (aka bitstrings or bitsets) implemented in C\n\n## API Examples\n\nLoad the library:\n\n    local bitmap = require 'bitmap'\n\nCreate a new bitmap with 1000 bits:\n\n    local map = bitmap.new(1000)\n\nRead the size:\n\n    map:size() -- 1000\n\nFill with zeros:\n\n    map:zero()\n\nFill with ones:\n\n    map:fill()\n\nSet bits:\n\n    map:set(100, 1) -- set 1 bit at offset 100\n    map:set(50, 5)  -- set 5 bits at offset 50\n\nRead bits:\n\n    map:get(52) -- true\n    map:get(62) -- false\n\nRead the weight (number of set bits):\n\n    map:weight() -- 6\n\nClear bits:\n\n    map:clear(0, 100) -- clear the first 100 bits\n\nBit operations:\n\n    map:band(other)    -- bit-AND\n    map:bor(other)     -- bit-OR\n    map:bxor(other)    -- bit-XOR\n    map:bandnot(other) -- bit-AND+NOT\n    map:bnot()         -- bit-NOT\n\nBoolean tests:\n\n    map:empty()\n    map:full()\n    map:equal(other)\n    map:intersects(other)\n    map:subset(other)\n\n## Testing\n\nRun tests via:\n\n    $ make test\n\nTo run benchmarks, try:\n\n    $ make benchmark\n\n## Licence\n\n    Copyright (c) 2013 Black Square Media Ltd\n\n    Permission is hereby granted, free of charge, to any person obtaining\n    a copy of this software and associated documentation files (the\n    \"Software\"), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, sublicense, and/or sell copies of the Software, and to\n    permit persons to whom the Software is furnished to do so, subject to\n    the following conditions:\n\n    The above copyright notice and this permission notice shall be\n    included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n    LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n    OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fbitmap.lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsm%2Fbitmap.lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fbitmap.lua/lists"}