A high-performance, full-featured text search engine library written in Java, used as the foundation for building search applications.
RoaringBitmap/RoaringBitmap
A Java library for compressed bitmaps (Roaring bitmaps) that supports fast set operations on integer sets with less memory than other formats.
- Stars
- 3,956
- Forks
- 599
- Open issues
- 81
- Last commit
- 2 days ago
What is it?
RoaringBitmap is a Java library that stores sets of integers as compressed bitmaps. It splits values into 65,536-value chunks and picks an array, bitmap, or run-length container per chunk, so it keeps random access and fast intersections, unions, and differences while using less memory than run-length formats such as WAH, EWAH, or Concise.
The library offers 32-bit bitmaps, 64-bit bitmaps (Roaring64Bitmap and Roaring64NavigableMap), memory-mapped immutable bitmaps via the org.roaringbitmap.buffer package, copy-on-write bitmaps, and RangeBitmap for range queries. Bitmaps can be serialized in a format shared with the C/C++ and Go implementations.
It is used by projects such as Apache Spark, Apache Hive, Apache Druid, Apache Pinot, Apache Iceberg, and Apache Flink, typically for indexing and set operations in databases and search engines.
Key features
- 01Compressed bitmaps with fast AND, OR, XOR, and ANDNOT operations on integer sets.
- 02Random access (contains, rank, select) without decompressing the whole bitmap.
- 0364-bit integer support through Roaring64Bitmap and Roaring64NavigableMap.
- 04Memory-mapped immutable bitmaps and copy-on-write mutable bitmaps.
- 05RangeBitmap for range queries such as less-than and greater-than.
- 06Serialization format interoperable with the C/C++ and Go implementations.
Use cases
- Building inverted indexes or row-ID sets in a database or search engine.
- Computing fast intersections of large sets of document or user IDs in Java services.
- Storing large sets of integers in memory or memory-mapped files with less RAM.
- Adding range filtering over numeric columns in analytics code.
Quick start
- 1
Add the Maven Central dependency to your pom.xml
- 2
Use the RoaringBitmap class in your Java code (import org.roaringbitmap.RoaringBitmap)
Topics
FAQ
- What is RoaringBitmap?
- A Java library for compressed bitmaps (Roaring bitmaps) that supports fast set operations on integer sets with less memory than other formats. RoaringBitmap is a Java library that stores sets of integers as compressed bitmaps. It splits values into 65,536-value chunks and picks an array, bitmap, or run-length container per chunk, so it keeps random access and fast intersections, unions, and differences while using less memory than run-length formats such as WAH, EWAH, or Concise.
- Is RoaringBitmap free to use? What license does it have?
- RoaringBitmap is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is RoaringBitmap still maintained?
- Actively maintained. The last commit to RoaringBitmap was on Nov 4, 2026.
- What can I use RoaringBitmap for?
- Building inverted indexes or row-ID sets in a database or search engine. Computing fast intersections of large sets of document or user IDs in Java services. Storing large sets of integers in memory or memory-mapped files with less RAM. Adding range filtering over numeric columns in analytics code.
- How do I install RoaringBitmap?
- Add the Maven Central dependency to your pom.xml Use the RoaringBitmap class in your Java code (import org.roaringbitmap.RoaringBitmap)
- Where can I get RoaringBitmap?
- The source code and installation instructions are on GitHub: https://github.com/RoaringBitmap/RoaringBitmap
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A full-text search engine library in Rust, inspired by Apache Lucene, for building custom search into applications.
Swift package providing commonly used data structures such as deques, heaps, ordered sets and dictionaries, and bit sets for Swift developers.
Apache Druid is a high-performance real-time analytics database for fast queries and ingestion, often used as an open-source alternative to data warehouses.
Apache Solr is an open-source, multi-modal search platform built on Apache Lucene for full-text, vector, and geospatial search.
An open-source pixel font covering Latin and CJK (Chinese, Japanese, Korean) characters, in a sans-serif gothic style.