public class VIntBlockDecompressor extends BlockDecompressor
BlockDecompressor
based on the Variable Integer
encoding algorithm.Constructor and Description |
---|
VIntBlockDecompressor() |
Modifier and Type | Method and Description |
---|---|
void |
decompress(org.apache.lucene.util.BytesRef input,
org.apache.lucene.util.IntsRef output)
Decompress the specified byte array into a list of integers.
|
int |
getWindowSize()
Return the window size over the
IntsRef output buffer used during
decompression. |
public void decompress(org.apache.lucene.util.BytesRef input, org.apache.lucene.util.IntsRef output)
BlockDecompressor
decompress
in class BlockDecompressor
public int getWindowSize()
BlockDecompressor
IntsRef
output buffer used during
decompression.
This is to avoid ArrayIndexOutOfBoundsException
if the decompressor
is working on a buffer which size does not match a multiple of the window
size.
For example, AForBlockDecompressor
is performing decompression using
a window of 32 integers. In the case of short postings list with
5 integers, the instantiated output buffer must be a multiple of window
size, i.e., 32 in this case. If the postings list would contain 33 integers
instead, then the instantiated output buffer should be 64.
getWindowSize
in class BlockDecompressor
Copyright © 2014. All rights reserved.