blob: 58339a1ff9701d4911a1ca6d420481c6acb7dfeb [file] [log] [blame]
\u001B[1mSYNOPSIS\u001B[0m
${project.description}
Original Maven URL:
\u001B[33mmvn:${pkgGroupId}/${pkgArtifactId}/${pkgVersion}\u001B[0m
\u001B[1mDESCRIPTION\u001B[0m
The bit array data structure is implemented in Java as the BitSet class. Unfortunately, this fails to scale
without compression.
JavaEWAH is a word-aligned compressed variant of the Java bitset class. It uses a 64-bit run-length encoding (RLE)
compression scheme. We trade-off some compression for better processing speed. We also have a 32-bit version which
compresses better, but is not as fast.
In general, the goal of word-aligned compression is not to achieve the best compression, but rather to improve query
processing time. Hence, we try to save CPU cycles, maybe at the expense of storage. However, the EWAH scheme we
implemented is always more efficient storage-wise than an uncompressed bitmap as implemented in the BitSet class).
Unlike some alternatives, javaewah does not rely on a patented scheme.
It includes exhaustive unit testing. As of November 2011, Apache Maven is used to build and validate the releases.
(Building the source code with javac remains trivial).
Usage:
// set bits at pos. 0, 2, 64, and 1<<30 to value "true" (others are false)
EWAHCompressedBitmap ewahBitmap1 = EWAHCompressedBitmap.bitmapOf(0,2,64,1<<30);
EWAHCompressedBitmap ewahBitmap2 = EWAHCompressedBitmap.bitmapOf(1,3,64,1<<30);
EWAHCompressedBitmap xorbitmap = EWAHCompressedBitmap.xor(ewahBitmap1,ewahBitmap2);
int[] setbits = xorbitmap.toArray();// which bits are set?
\u001B[1mSEE ALSO\u001B[0m
\u001B[36mhttp://code.google.com/p/javaewah/\u001B[0m