{"id":17086557,"url":"https://github.com/arl/bitstring","last_synced_at":"2025-06-24T22:36:12.359Z","repository":{"id":50216201,"uuid":"368648728","full_name":"arl/bitstring","owner":"arl","description":"Go Bitstring module","archived":false,"fork":false,"pushed_at":"2021-06-18T23:01:31.000Z","size":82,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T14:42:11.874Z","etag":null,"topics":["bit-twiddling","bitmap","bitstring","go","golang"],"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/arl.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":"2021-05-18T19:44:23.000Z","updated_at":"2024-05-09T05:41:09.000Z","dependencies_parsed_at":"2022-09-24T08:30:43.905Z","dependency_job_id":null,"html_url":"https://github.com/arl/bitstring","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/arl/bitstring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fbitstring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fbitstring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fbitstring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fbitstring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arl","download_url":"https://codeload.github.com/arl/bitstring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fbitstring/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261768505,"owners_count":23207020,"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":["bit-twiddling","bitmap","bitstring","go","golang"],"created_at":"2024-10-14T13:28:56.309Z","updated_at":"2025-06-24T22:36:12.337Z","avatar_url":"https://github.com/arl.png","language":"Go","readme":"[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/arl/bitstring)\n[![Test Actions Status](https://github.com/arl/bitstring/workflows/Test/badge.svg)](https://github.com/arl/bitstring/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/arl/bitstring)](https://goreportcard.com/report/github.com/arl/bitstring)\n[![codecov](https://codecov.io/gh/arl/bitstring/branch/main/graph/badge.svg)](https://codecov.io/gh/arl/bitstring)\n\n# `bitstring`\n\nGo bitstring library\n\nPackage `bitstring` implements a fixed length bit string type and bit manipulation functions.\n\n - Get/Set/Clear/Flip a single bit: `Bit`|`SetBit`|`ClearBit`|`FlipBit`\n - Set/Clear/Flip a range of bits: `SetRange`|`ClearRange`|`FlipRange`\n - Compare 2 bit strings: `Equals` or `EqualsRange`\n - 8/16/32/64/N signed/unsigned to/from conversions:\n   - `Uint8`|`Uint16`|`Uint32`|`Uint64`|`Uintn`\n   - `SetUint8`|`SetUint16`|`SetUint32`|`SetUint64`|`SetUintn`\n - Count ones/zeroes: `ZeroesCount`|`OnesCount`\n - Gray code conversion methods: `Gray8`|`Gray16`|`Gray32`|`Gray64`|`Grayn`\n - Convert to/from `big.Int`: `BigInt` | `NewFromBig`\n - Copy/Clone methods: `Copy`|`Clone`|`CopyRange`\n - Trailing/LeadingZeroes : `TrailingZeroes`|`LeadingZeroes`\n\n\n# Debug version\n\nBy default, bit offsets arguments to `bitstring` methods are not checked. This\nallows not to pay the performance penalty of always checking offsets, in\nenvironments where they are constants or always known beforehand.\n\nYou can enable runtime checks by passing the `bitstring_debug` build tag to `go`\nwhen building the `bitstring` package.\n\n**TODO**:\n - RotateLeft/Right ShiftLeft/Right\n - Trailing/Leading ones\n - Or, And, Xor between bitstrings\n - Reverse\n - Run CI on big|little endian and 32|64 bits (for now only amd64) (see https://github.com/docker/setup-qemu-action)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fbitstring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farl%2Fbitstring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fbitstring/lists"}