public abstract class BlockDecompressor extends Object
Constructor and Description |
---|
BlockDecompressor() |
Modifier and Type | Method and Description |
---|---|
abstract void |
decompress(org.apache.lucene.util.BytesRef input,
org.apache.lucene.util.IntsRef output)
Decompress the specified byte array into a list of integers.
|
abstract int |
getWindowSize()
Return the window size over the
IntsRef output buffer used during
decompression. |
public abstract int getWindowSize()
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.
public abstract void decompress(org.apache.lucene.util.BytesRef input, org.apache.lucene.util.IntsRef output)
Copyright © 2014. All rights reserved.