|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.util.packed.BlockPackedWriter
public final class BlockPackedWriter
A writer for large sequences of longs.
The sequence is divided into fixed-size blocks and for each block, the difference between each value and the minimum value of the block is encoded using as few bits as possible. Memory usage of this class is proportional to the block size. Each block has an overhead between 1 and 10 bytes to store the minimum value and the number of bits per value of the block.
BlockPackedReader
Constructor Summary | |
---|---|
BlockPackedWriter(DataOutput out,
int blockSize)
Sole constructor. |
Method Summary | |
---|---|
void |
add(long l)
Append a new long. |
void |
finish()
Flush all buffered data to disk. |
long |
ord()
Return the number of values which have been added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockPackedWriter(DataOutput out, int blockSize)
blockSize
- the number of values of a single block, must be a multiple of 64Method Detail |
---|
public void add(long l) throws IOException
IOException
public void finish() throws IOException
IOException
public long ord()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |