java.lang.Object
org.elasticsearch.index.codec.ForUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddecode(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) Decode 128 integers intolongs.static voiddecodeTo32(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) Decodes 128 integers into 64longssuch that each long contains two values, each represented with 32 bits.static voidencode(long[] longs, int bitsPerValue, org.apache.lucene.store.DataOutput out) Encode 128 integers fromlongsintoout.static intnumBytes(int bitsPerValue) Number of bytes required to encode 128 integers ofbitsPerValuebits per value.
-
Field Details
-
BLOCK_SIZE
public static final int BLOCK_SIZE- See Also:
-
-
Method Details
-
encode
public static void encode(long[] longs, int bitsPerValue, org.apache.lucene.store.DataOutput out) throws IOException Encode 128 integers fromlongsintoout.- Throws:
IOException
-
numBytes
public static int numBytes(int bitsPerValue) Number of bytes required to encode 128 integers ofbitsPerValuebits per value. -
decode
public static void decode(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) throws IOException Decode 128 integers intolongs.- Throws:
IOException
-
decodeTo32
public static void decodeTo32(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) throws IOException Decodes 128 integers into 64longssuch that each long contains two values, each represented with 32 bits. Values [0..63] are encoded in the high-order bits oflongs[0..63], and values [64..127] are encoded in the low-order bits oflongs[0..63]. This representation may allow subsequent operations to be performed on two values at a time.- Throws:
IOException
-