public final class BitStream
extends java.lang.Object
Constructor and Description |
---|
BitStream(LongArray data,
long start,
int startBit,
int numBits) |
Modifier and Type | Method and Description |
---|---|
void |
advance(int n)
Advances without returning any bits.
|
boolean |
finished() |
void |
mark()
Sets a mark at the current bit that can be returned to using
rewindToMark.
|
long |
next(int n)
Read and return next n bits.
|
boolean |
nextBit() |
int |
nextConsecutiveZeros()
Reads a string of zeros followed by a 1.
|
int |
numBitsLeft() |
void |
rewind(int i) |
void |
rewindToMark() |
public BitStream(LongArray data, long start, int startBit, int numBits)
public boolean nextBit()
public int nextConsecutiveZeros()
public long next(int n)
n
- public boolean finished()
public void rewind(int i)
public int numBitsLeft()
public void advance(int n)
n
- public void mark()
public void rewindToMark()