Package org.apache.lucene.backward_codecs.packed

## Class LegacyDirectReader

- java.lang.Object
- - org.apache.lucene.backward_codecs.packed.LegacyDirectReader

-     public class LegacyDirectReader
      extends Object

  Retrieves an instance previously written by `LegacyDirectWriter`

  Example usage:

         int bitsPerValue = 100;
         IndexInput in = dir.openInput("packed", IOContext.DEFAULT);
         LongValues values = LegacyDirectReader.getInstance(in.randomAccessSlice(start, end), bitsPerValue);
         for (int i = 0; i < numValues; i++) {
           long value = values.get(i);
         }

  See Also:
    `LegacyDirectWriter`

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static LongValues` | `getInstance​(RandomAccessInput slice, int bitsPerValue)` | Retrieves an instance from the specified slice written decoding `bitsPerValue` for each value
    `static LongValues` | `getInstance​(RandomAccessInput slice, int bitsPerValue, long offset)` | Retrieves an instance from the specified `offset` of the given slice decoding `bitsPerValue` for each value

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

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

- - ### Method Detail

    - #### getInstance

          public static LongValues getInstance​(RandomAccessInput slice,
                                               int bitsPerValue)

      Retrieves an instance from the specified slice written decoding `bitsPerValue` for each value

    - #### getInstance

          public static LongValues getInstance​(RandomAccessInput slice,
                                               int bitsPerValue,
                                               long offset)

      Retrieves an instance from the specified `offset` of the given slice decoding `bitsPerValue` for each value