RoaringBitmap is a compressed bitset library for Java that outperforms conventional bitmap compression methods while often delivering better compression ratios and speed than uncompressed alternatives.
Bitsets are efficient data structures for many applications, but standard implementations consume significant memory. Roaring bitmaps solve this by using a hybrid compression approach that combines array and bitmap storage within a tree structure, adapting automatically to the density of the data. This design tends to outperform older compression schemes like WAH, EWAH, and Concise, sometimes by orders of magnitude, while remaining faster than uncompressed bitmaps in many scenarios.
The library suits projects that need fast set operations on large integer collections, particularly in data analytics, search indexing, and filtering workloads. It is especially valuable when memory efficiency matters alongside query speed. The tool supports unsigned integers, 64-bit longs, memory-mapped bitmaps, copy-on-write semantics, and range operations. It integrates with Maven and Gradle and provides Kryo serialization support. The README does not name specific alternatives beyond mentioning that roaring bitmaps outperform WAH, EWAH, and Concise compression methods.
The project maintains active engagement with its user base through a mailing list and discussion group. Development includes comprehensive benchmarking infrastructure to validate performance claims. The codebase supports multiple build environments including IntelliJ and Eclipse, with documented contribution guidelines. The library has been deployed in production across numerous high-profile systems including Apache Spark, Netflix Atlas, Apache Pinot, and Apache Druid, establishing it as a mature and battle-tested solution.