GroupVIntUtil (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util, class: GroupVIntUtil

Package org.apache.lucene.util

# Class GroupVIntUtil

java.lang.Object
org.apache.lucene.util.GroupVIntUtil

public final class GroupVIntUtil extends Object
This class contains utility methods and constants for group varint

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `GroupVIntUtil.IntReader`
  Deprecated.
  No longer used.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_LENGTH_PER_GROUP`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GroupVIntUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `readGroupVInt(DataInput in, int[] dst, int offset)`
  Deprecated.
  Use `readGroupVInts(DataInput, int[], int)` to decode a full group including tails instead
  `static void`
  `readGroupVInt(DataInput in, long[] dst, int offset)`
  Deprecated.
  Only for backwards codecs
  `static int`
  `readGroupVInt(DataInput in, long remaining, GroupVIntUtil.IntReader reader, long pos, int[] dst, int offset)`
  Deprecated.
  Don't call this method, it is no longer implemented.
  `static void`
  `readGroupVInts(DataInput in, int[] dst, int limit)`
  Read all the group varints, including the tail vints.
  `static void`
  `readGroupVInts(DataInput in, long[] dst, int limit)`
  Deprecated.
  Only for backwards codecs
  `static void`
  `readGroupVInts$Baseline(DataInput in, int[] dst, int limit)`
  DO not use! Only visible for benchmarking purposes!
  `static void`
  `writeGroupVInts(DataOutput out, byte[] scratch, int[] values, int limit)`
  The implementation for group-varint encoding, It uses a maximum of `MAX_LENGTH_PER_GROUP` bytes scratch buffer.
  `static void`
  `writeGroupVInts(DataOutput out, byte[] scratch, long[] values, int limit)`
  Deprecated.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MAX_LENGTH_PER_GROUP

    public static final int MAX_LENGTH_PER_GROUP
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### GroupVIntUtil

    public GroupVIntUtil()

- ## Method Details

  - ### readGroupVInts

    public static void readGroupVInts(DataInput in, int[] dst, int limit) throws IOException
    Read all the group varints, including the tail vints.
    Parameters:
      `dst` - the array to read ints into.
      `limit` - the number of int values to read.
    Throws:
      `IOException`
    WARNING: This API is experimental and might change in incompatible ways in the next release.

  - ### readGroupVInt

    @Deprecated public static void readGroupVInt(DataInput in, int[] dst, int offset) throws IOException
    Deprecated.
    Use `readGroupVInts(DataInput, int[], int)` to decode a full group including tails instead
    Read single group, for optimal performance, you should use `readGroupVInts(DataInput, int[], int)` to decode a full group including tails instead.
    Parameters:
      `in` - the input to use to read data.
      `dst` - the array to read ints into.
      `offset` - the offset in the array to start storing ints.
    Throws:
      `IOException`

  - ### readGroupVInts$Baseline

    public static void readGroupVInts$Baseline(DataInput in, int[] dst, int limit) throws IOException
    DO not use! Only visible for benchmarking purposes!
    Throws:
      `IOException`

  - ### readGroupVInt

    @Deprecated public static int readGroupVInt(DataInput in, long remaining, GroupVIntUtil.IntReader reader, long pos, int[] dst, int offset) throws IOException
    Deprecated.
    Don't call this method, it is no longer implemented. It was only provided for custom `DataInput` subclasses to allow to provide a faster GroupVInt encoding when random access is provided by the underlying storage. This is now obsolete, any implementation calling this should be removed in the calling class.
    Faster implementation of read single group, It read values from the buffer that would not cross boundaries.
    Throws:
      `UnsupportedOperationException` - (always)
      `IOException`

  - ### writeGroupVInts

    public static void writeGroupVInts(DataOutput out, byte[] scratch, int[] values, int limit) throws IOException
    The implementation for group-varint encoding, It uses a maximum of `MAX_LENGTH_PER_GROUP` bytes scratch buffer.
    Throws:
      `IOException`

  - ### readGroupVInts

    @Deprecated public static void readGroupVInts(DataInput in, long[] dst, int limit) throws IOException
    Deprecated.
    Only for backwards codecs
    Read all the group varints, including the tail vints to a long[].
    Parameters:
      `dst` - the array to read ints into.
      `limit` - the number of int values to read.
    Throws:
      `IOException`
    WARNING: This API is experimental and might change in incompatible ways in the next release.

  - ### readGroupVInt

    @Deprecated public static void readGroupVInt(DataInput in, long[] dst, int offset) throws IOException
    Deprecated.
    Only for backwards codecs
    Default implementation of read single group, for optimal performance, you should use `readGroupVInts(DataInput, long[], int)` instead.
    Parameters:
      `in` - the input to use to read data.
      `dst` - the array to read ints into.
      `offset` - the offset in the array to start storing ints.
    Throws:
      `IOException`

  - ### writeGroupVInts

    @Deprecated public static void writeGroupVInts(DataOutput out, byte[] scratch, long[] values, int limit) throws IOException
    Deprecated.
    The implementation for group-varint encoding, It uses a maximum of `MAX_LENGTH_PER_GROUP` bytes scratch buffer.
    Throws:
      `IOException`