finds.dev

RoaringBitmap/roaring

Roaring bitmaps in Go (golang), used by InfluxDB, Bleve, DataDog

View on GitHubHomepage ↗

★ 2,891GoApache-2.0updated Jun 2026

// the take

Go implementation of Roaring bitmaps, the compressed bitset format used in Lucene, Druid, InfluxDB, and a dozen other serious data systems. It stores sets of unsigned integers with fast set operations (AND, OR, XOR, NOT) by partitioning data into 65536-element chunks and choosing the most compact representation per chunk. If you're building anything that needs fast set intersection on large integer domains — indexing, filtering, tag systems — this is the right tool.

Binary-compatible with the Java and C++ Roaring implementations via a published format spec, so you can serialize in Go and deserialize in Java without conversion code. Three container types (array, bitmap, run-length) are selected automatically per chunk, so the structure self-optimizes for both sparse and dense distributions without configuration. ParOr and ParAnd expose parallel aggregation across many bitmaps using a worker pool, which matters when you're doing multi-term query intersection. CI matrix covers ARM, Windows, macOS, and big-endian, which is unusual and means you're not going to hit surprise failures on non-amd64 targets.

The 64-bit variant (roaring64) is not cross-language compatible — explicitly documented as not interoperable with Java or C++ — which is a sharp edge if you're in a polyglot system and assumed otherwise. No goroutine safety on Bitmap operations; you must bring your own mutex or channel discipline, and the docs bury this fact at the end of a long README rather than in the type-level godoc where you'd actually see it. The `Validate()` call after deserialization from untrusted input is mentioned as optional but really isn't — the README says 'necessary for security' in passing, which understates the risk. BitSliceIndexing package is present but barely documented, making it hard to evaluate whether it's production-ready or an experiment.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,891
Forks
257
Language
Go
License
Apache-2.0
Last commit
11 Jun 2026

// nearby

If roaring isn't quite it.

All repos →