public final class BlockPackedWriter extends Object
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 and Description |
---|
BlockPackedWriter(DataOutput out,
int blockSize)
Sole constructor.
|
public BlockPackedWriter(DataOutput out, int blockSize)
blockSize
- the number of values of a single block, must be a multiple of 64public void add(long l) throws IOException
IOException
public void finish() throws IOException
IOException
public long ord()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.