// the find
lemire/EWAHBoolArray
A compressed bitmap class in C++.
EWAHBoolArray is a header-only C++ implementation of Enhanced Word-Aligned Hybrid (EWAH) compressed bitmaps — run-length encoding for bitsets where large spans of zeros or ones are common. It's for people building database indexes, search engines, or anything that needs fast set intersection/union on sparse integer sets without paying the memory cost of a flat bitarray. Lemire is the researcher behind Roaring Bitmaps too, so this is academically grounded work.
The README honestly tells you when NOT to use this library, which is rare and useful — small universe sizes, dense bitmaps, or when you just need random access. The encoding supports 'skipping' over uncompressed words during AND/OR operations, which is the key performance win over BBC/WAH/Concise. It's header-only with zero dependencies and compiles cleanly on MSVC, GCC, and Clang across x64 and ARM. Real production pedigree: Git uses EWAH internally for object counting, and the Java sibling lives in Apache Hive and JGit.
The author explicitly points out that Roaring Bitmaps (his own newer library) is faster for random access — so if you're starting fresh, you should probably use Roaring instead of this. Persistent storage is naive: no endianness correction, and you're told to validate with hashes yourself if loading from untrusted sources, which is not something most callers will actually do. The API surface is thin; there's no SIMD-accelerated path documented, and the benchmarks directory exists but there's nothing comparing it against modern Roaring or std::bitset on realistic workloads. With 459 stars and last activity in late 2024, it's maintained but not actively developed.