Unfortunately, the Java BitSet class will not scale to large sparse bitmaps—the Sun implementation does not use compression.
I published a new free alternative: JavaEWAH.
- The library contains the 64-bit EWAH algorithm described—among other places—in one of my recent research papers.
- It is a Java port of some of my C++ Bitmap Index library.
- Glen Newton gave me the idea for this project.