Class BlockPackedReader

java.lang.Object
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.BlockPackedReader
All Implemented Interfaces:
Accountable

public final class BlockPackedReader extends LongValues implements Accountable
Provides random access to a stream written with BlockPackedWriter.
  • Field Details

    • blockShift

      private final int blockShift
    • blockMask

      private final int blockMask
    • valueCount

      private final long valueCount
    • minValues

      private final long[] minValues
    • subReaders

      private final PackedInts.Reader[] subReaders
    • sumBPV

      private final long sumBPV
  • Constructor Details

    • BlockPackedReader

      public BlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException
      Sole constructor.
      Throws:
      IOException
  • Method Details

    • get

      public long get(long index)
      Description copied from class: LongValues
      Get value at index.
      Specified by:
      get in class LongValues
    • ramBytesUsed

      public long ramBytesUsed()
      Description copied from interface: Accountable
      Return the memory usage of this object in bytes. Negative values are illegal.
      Specified by:
      ramBytesUsed in interface Accountable
    • toString

      public String toString()
      Overrides:
      toString in class Object