DirectReader

Retrieves an instance previously written by DirectWriter

Example usage:

int bitsPerValue = DirectWriter.bitsRequired(100);
IndexInput in = dir.openInput("packed", IOContext.DEFAULT);
LongValues values = DirectReader.getInstance(in.randomAccessSlice(start, end), bitsPerValue);
for (int i = 0; i < numValues; i++) {
long value = values.get(i);
}
*

See also

Properties

Link copied to clipboard
const val MERGE_BUFFER_SHIFT: Int = 7

Functions

Link copied to clipboard
fun getInstance(slice: RandomAccessInput, bitsPerValue: Int): LongValues

Retrieves an instance from the specified slice written decoding bitsPerValue for each value

fun getInstance(slice: RandomAccessInput, bitsPerValue: Int, offset: Long): LongValues

Retrieves an instance from the specified offset of the given slice decoding bitsPerValue for each value

Link copied to clipboard
fun getMergeInstance(slice: RandomAccessInput, bitsPerValue: Int, numValues: Long): LongValues?

Retrieves an instance that is specialized for merges and is typically faster at sequential access but slower at random access.

fun getMergeInstance(slice: RandomAccessInput, bitsPerValue: Int, baseOffset: Long, numValues: Long): LongValues?

Retrieves an instance that is specialized for merges and is typically faster at sequential access.