USUAL_EXTENSION| Constructor and Description |
|---|
DebuggingBitIn(BitIn _in)
Wraps a BitIn implementation with logging calls
|
| Modifier and Type | Method and Description |
|---|---|
void |
align()
Aligns the stream to the next byte
|
void |
close() |
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.
|
public DebuggingBitIn(BitIn _in)
public void align()
throws IOException
BitInalign in interface BitInIOException - if an I/O error occurspublic byte getBitOffset()
BitIngetBitOffset in interface BitInpublic long getByteOffset()
BitIngetByteOffset in interface BitInpublic int readBinary(int len)
throws IOException
BitInreadBinary in interface BitInlen - the number of binary bits to readIOException - if an I/O error occurspublic int readDelta()
throws IOException
BitInreadDelta in interface BitInIOException - if an I/O error occurspublic int readGamma()
throws IOException
BitInreadGamma in interface BitInIOException - if an I/O error occurspublic int readGolomb(int b)
throws IOException
BitInreadGolomb in interface BitInb - the golomb modulusIOException - if and I/O error occurspublic void readInterpolativeCoding(int[] data,
int offset,
int len,
int lo,
int hi)
throws IOException
BitInreadInterpolativeCoding in interface BitIndata - 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)IOException - if an I/O error occurspublic int readMinimalBinary(int b)
throws IOException
BitInreadMinimalBinary in interface BitInb - the upper boundIOException - if an I/O error occurspublic int readMinimalBinaryZero(int b)
throws IOException
BitInreadMinimalBinaryZero in interface BitInb - the upper boundIOException - if an I/O error occurspublic int readSkewedGolomb(int b)
throws IOException
BitInv = <0, 2b, 4b, ... , 2^i b, ...>
The sum of the elements in the vector goes
b, 3b, 7b, 2^(i-1)*breadSkewedGolomb in interface BitInIOException - if an I/O error occurspublic int readUnary()
throws IOException
BitInreadUnary in interface BitInIOException - if an I/O error occurspublic void skipBits(int len)
throws IOException
BitInskipBits in interface BitInlen - The number of bits to skipIOException - if an I/O error occurspublic void skipBytes(long len)
throws IOException
BitInskipBytes in interface BitInlen - The number of bytes to skipIOException - if an I/O error occurspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow