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

public final class ForUtil extends Object
  • Field Summary Link icon

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

    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 Link icon

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

  • Method Details Link icon

    • encode Link icon

      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 Link icon

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

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

      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