public abstract class BlockCompressor extends Object
Constructor and Description |
---|
BlockCompressor() |
Modifier and Type | Method and Description |
---|---|
abstract void |
compress(org.apache.lucene.util.IntsRef input,
org.apache.lucene.util.BytesRef output)
Compress the specified list of integers into a byte array.
|
abstract int |
getWindowSize()
Return the window size over the
IntsRef input buffer used during
compression. |
abstract int |
maxCompressedSize(int blockSize)
The maximum size in bytes of a compressed block of values
|
public abstract int getWindowSize()
IntsRef
input buffer used during
compression.
This is to avoid ArrayIndexOutOfBoundsException
if the compressor
is working on a buffer which size does not match a multiple of the window
size.
For example, AForBlockCompressor
is performing compression using
a window of 32 integers. In the case of short postings list with
5 integers, the instantiated input 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 input buffer should be 64.
public abstract void compress(org.apache.lucene.util.IntsRef input, org.apache.lucene.util.BytesRef output)
public abstract int maxCompressedSize(int blockSize)
Copyright © 2014. All rights reserved.