My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

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.

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:

                    EWAHCompressedBitmap ewahBitmap1 = new EWAHCompressedBitmap();
                    EWAHCompressedBitmap ewahBitmap2 = new EWAHCompressedBitmap();
                    ewahBitmap1.set(0);
                    ewahBitmap1.set(2);
                    ewahBitmap1.set(64);
                    ewahBitmap1.set(1<<30);
                    ewahBitmap2.set(1);
                    ewahBitmap2.set(3);
                    ewahBitmap2.set(64);
                    ewahBitmap2.set(1<<30);
                    EWAHCompressedBitmap xorbitmap = ewahBitmap1.xor(ewahBitmap2);

Maven support:

You can download JavaEWAH from the Maven central repository: http://repo1.maven.org/maven2/com/googlecode/javaewah/JavaEWAH/

You can also specify the dependency in the Maven "pom.xml" file:

  <dependencies>
    <dependency>
	<groupId>com.googlecode.javaewah</groupId>
	<artifactId>JavaEWAH</artifactId>
	<version>0.3.3</version>
    </dependency>
  </dependencies>

where 0.3.3 is the JavaEWAH version you want to use.

More info:

Powered by Google Project Hosting