{"id":13713633,"url":"https://github.com/lit-technology/bit-ranges","last_synced_at":"2025-12-25T01:29:39.436Z","repository":{"id":56699525,"uuid":"175941147","full_name":"lit-technology/bit-ranges","owner":"lit-technology","description":"(Un)setting n least significant bits and merging intersecting number ranges.","archived":false,"fork":false,"pushed_at":"2020-10-24T11:14:34.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-14T00:34:03.243Z","etag":null,"topics":["bits","go"],"latest_commit_sha":null,"homepage":"","language":"Go","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/lit-technology.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":"2019-03-16T07:36:09.000Z","updated_at":"2021-02-10T11:45:37.000Z","dependencies_parsed_at":"2022-08-15T23:31:25.620Z","dependency_job_id":null,"html_url":"https://github.com/lit-technology/bit-ranges","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/lit-technology%2Fbit-ranges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Fbit-ranges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Fbit-ranges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Fbit-ranges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lit-technology","download_url":"https://codeload.github.com/lit-technology/bit-ranges/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252791572,"owners_count":21804800,"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":["bits","go"],"created_at":"2024-08-02T23:01:41.008Z","updated_at":"2025-12-25T01:29:39.377Z","avatar_url":"https://github.com/lit-technology.png","language":"Go","readme":"# Bit Ranges\n\n[![BuildStatus Widget]][BuildStatus Result]\n[![CodeCov Widget]][CodeCov Result]\n[![GoReport Widget]][GoReport Status]\n[![GoDoc Widget]][GoDoc]\n\n[BuildStatus Result]: https://travis-ci.org/philip-bui/bit-ranges\n[BuildStatus Widget]: https://travis-ci.org/philip-bui/bit-ranges.svg?branch=master\n\n[CodeCov Result]: https://codecov.io/gh/philip-bui/bit-ranges\n[CodeCov Widget]: https://codecov.io/gh/philip-bui/bit-ranges/branch/master/graph/badge.svg\n\n[GoReport Status]: https://goreportcard.com/report/github.com/philip-bui/bit-ranges\n[GoReport Widget]: https://goreportcard.com/badge/github.com/philip-bui/bit-ranges\n\n[GoDoc]: https://godoc.org/github.com/philip-bui/bit-ranges\n[GoDoc Widget]: https://godoc.org/github.com/philip-bui/bit-ranges?status.svg\n\nLibrary for setting and unsetting `n` least significant bits as ranges, and merging intersecting ranges.\n\n## Usage\n\n```go\nimport (\n\t\"github.com/philip-bui/bit-ranges\"\n)\n\nfunc main() {\n\tl, h := bits.RangeUint64(5, 777) // 1100001001.\n\t// l = 768, 1100000000.\n\t// h = 799, 1100011111.\n\tarr := bits.RangesUint64(5, 700, 799, 777, 768, 800, 77)\n\t// arr = [831, 768, 703, 672, 95, 64]. Arr will always be even amount (pairs).\n}\n```\n\n## License\n\nBit Ranges is available under the MIT license. [See LICENSE](https://github.com/philip-bui/bit-ranges/blob/master/LICENSE) for details.\n","funding_links":[],"categories":["Repositories"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-technology%2Fbit-ranges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flit-technology%2Fbit-ranges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-technology%2Fbit-ranges/lists"}