# bits-and-blooms/bitset

Go package implementing bitsets

Repository: https://github.com/bits-and-blooms/bitset
Canonical: https://ross.abutalabs.com/products/bitset
Homepage: https://bits-and-blooms.github.io/bitset/
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: bitset, go
Last push: 2026-08-13T17:13:19+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 97, longevity 100
- inputs: {"age_days": 5593, "days_push": 20, "days_rel": 20, "gap_med": 13, "n_releases_24m": 18}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1513, forks 191 (observed 2026-08-28T04:04:56.218465+00:00)

## What it is
A Go library implementing bitsets, providing an efficient mapping between non-negative integers and boolean values. It supports individual bit operations plus full set algebra (union, intersection, difference, complement) with portable serialization.

## Use cases
- represent sets of integers compactly in Go
- replace map[uint]bool with a memory-efficient structure
- compute intersections and unions of integer sets
- iterate over set bits efficiently
- serialize bitsets to bytes or JSON
- track membership flags for large ID spaces

## When to choose
- you need fast, memory-efficient set operations over non-negative integers in Go
- you want battle-tested, fuzz-tested bitset code used in production systems
- you need portable serialization of bitset state

## When to avoid
- you need sparse sets over very large ranges where compressed/roaring bitmaps are better
- you need to store non-integer keys or arbitrary values
- you work outside the Go ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, performance
- platform: go, cross-platform
- tags: bitset, bit-manipulation, set-algebra, data-structures, algorithms

## Member repositories
- bits-and-blooms/bitset (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:56.218465+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:32:14.495013+00:00, confidence not recorded.
  - readme: https://github.com/bits-and-blooms/bitset (fetched 2026-08-28T04:04:56.218465+00:00, sha cce0ffd8f36d)
  - homepage: https://bits-and-blooms.github.io/bitset/ (fetched 2026-08-29T11:35:51.072408+00:00, sha bb70d463f264)
- Data as of 2026-08-30T08:39:29.467469+00:00.
