java.lang.Object
org.elasticsearch.index.codec.ForUtil

public final class ForUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    decode(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs)
    Decode 128 integers into longs.
    static void
    decodeTo32(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs)
    Decodes 128 integers into 64 longs 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 from longs into out.
    static int
    numBytes(int bitsPerValue)
    Number of bytes required to encode 128 integers of bitsPerValue bits per value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • encode

      public static void encode(long[] longs, int bitsPerValue, org.apache.lucene.store.DataOutput out) throws IOException
      Encode 128 integers from longs into out.
      Throws:
      IOException
    • numBytes

      public static int numBytes(int bitsPerValue)
      Number of bytes required to encode 128 integers of bitsPerValue bits per value.
    • decode

      public static void decode(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) throws IOException
      Decode 128 integers into longs.
      Throws:
      IOException
    • decodeTo32

      public static void decodeTo32(int bitsPerValue, org.apache.lucene.store.DataInput in, long[] longs) throws IOException
      Decodes 128 integers into 64 longs such that each long contains two values, each represented with 32 bits. Values [0..63] are encoded in the high-order bits of longs [0..63], and values [64..127] are encoded in the low-order bits of longs [0..63]. This representation may allow subsequent operations to be performed on two values at a time.
      Throws:
      IOException