java.lang.Object
org.elasticsearch.index.codec.ForUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
decode
(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) Decode 128 integers intolongs
.static void
decodeTo32
(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) Decodes 128 integers into 64longs
such that each long contains two values, each represented with 32 bits.static void
encode
(long[] longs, int bitsPerValue, org.apache.lucene.store.DataOutput out) Encode 128 integers fromlongs
intoout
.static int
numBytes
(int bitsPerValue) Number of bytes required to encode 128 integers ofbitsPerValue
bits 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 fromlongs
intoout
.- Throws:
IOException
-
numBytes
public static int numBytes(int bitsPerValue) Number of bytes required to encode 128 integers ofbitsPerValue
bits 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 64longs
such 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
-