
java-bit-arrays
A Java library that abstracts memory and files on disk as an infinitely long array of bits. It also contains a variety of classes to read sequences of bits to make it easier to encode data in the format you want. For example: ``` InfiniteBitArray array = JBitArrays.fileAsBitArray( new File("./demo.bin"), /memory-mapped buffer size in bytes/ 1000 * 1000); array.set(/index to set/ 34483302, /the bit/ true); array.setN(235904, /bits to set/ 31, /from lowest bits of/ 0xDEADBEEF);
CrawlerReader reader = JBitArrays.startReading(array, /starting at index/ 177); boolean firstBit = reader.getNext(); int next17bits = reader.getNextN(17); // returned in lowest bits of int ```
http://java-bit-arrays.googlecode.com/svn/wiki/javadoc/1.0.1/index.html'>Javadoc
Maven POM snippet:
<dependency>
<groupId>com.googlecode.java-bit-arrays</groupId>
<artifactId>java-bit-arrays</artifactId>
<version>1.0.1</version>
</dependency>
Project Information
The project was created on Jan 5, 2012.
- License: Apache License 2.0
- 1 stars
- svn-based source control
Labels:
java
bit-manipulation