|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BitIn
Interface describing the read compression methods supported by the BitFileBuffered and BitInputStream classes. Integers read by the BitIn interface are always greater than 0.
| Field Summary | |
|---|---|
static java.lang.String |
USUAL_EXTENSION
file extension |
| Method Summary | |
|---|---|
void |
align()
Aligns the stream to the next byte |
byte |
getBitOffset()
Returns the bit offset in the last byte. |
long |
getByteOffset()
Returns the byte offset of the stream. |
int |
readBinary(int len)
Reads a binary integer from the already read buffer. |
int |
readDelta()
Reads a delta encoded integer from the underlying stream |
int |
readGamma()
Reads a gamma encoded integer from the underlying stream |
int |
readGolomb(int b)
Reads a Golomb encoded integer |
void |
readInterpolativeCoding(int[] data,
int offset,
int len,
int lo,
int hi)
Reads a sequence of numbers from the stream interpolative coded. |
int |
readMinimalBinary(int b)
Reads a binary encoded integer, given an upper bound |
int |
readMinimalBinaryZero(int b)
Reads a minimal binary encoded number, when the upper bound can b zero. |
int |
readSkewedGolomb(int b)
Reads a skewed-golomb encoded integer from the underlying stream Consider a bucket-vector v = <0, 2b, 4b, ... |
int |
readUnary()
Reads a unary encoded integer from the underlying stream |
void |
skipBits(int len)
Skip a number of bits while reading the bit file. |
void |
skipBytes(long len)
Skip a number of bytes while reading the bit file. |
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Field Detail |
|---|
static final java.lang.String USUAL_EXTENSION
| Method Detail |
|---|
long getByteOffset()
byte getBitOffset()
int readUnary()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
int readGamma()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
int readBinary(int len)
throws java.io.IOException
len - the number of binary bits to read
java.io.IOException - if an I/O error occurs
int readMinimalBinary(int b)
throws java.io.IOException
b - the upper bound
java.io.IOException - if an I/O error occurs
int readMinimalBinaryZero(int b)
throws java.io.IOException
b - the upper bound
java.io.IOException - if an I/O error occurs
int readGolomb(int b)
throws java.io.IOException
b - the golomb modulus
java.io.IOException - if and I/O error occurs
int readSkewedGolomb(int b)
throws java.io.IOException
v = <0, 2b, 4b, ... , 2^i b, ...>
The sum of the elements in the vector goes
b, 3b, 7b, 2^(i-1)*b
java.io.IOException - if an I/O error occurs
int readDelta()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
void readInterpolativeCoding(int[] data,
int offset,
int len,
int lo,
int hi)
throws java.io.IOException
data - the result vectoroffset - offset where to write in the vectorlen - the number of integers to decode.lo - a lower bound (the same one passed to writeInterpolativeCoding)hi - an upper bound (the same one passed to writeInterpolativeCoding)
java.io.IOException - if an I/O error occurs
void skipBits(int len)
throws java.io.IOException
len - The number of bits to skip
java.io.IOException - if an I/O error occurs
void skipBytes(long len)
throws java.io.IOException
len - The number of bytes to skip
java.io.IOException - if an I/O error occurs
void align()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||