Class PackedDataInput


  • public final class PackedDataInput
    extends Object
    A DataInput wrapper to read unaligned, variable-length packed integers. This API is much slower than the PackedInts fixed-length API but can be convenient to save space.
    See Also:
    PackedDataOutput
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • PackedDataInput

        public PackedDataInput​(DataInput in)
        Create a new instance that wraps in.
    • Method Detail

      • readLong

        public long readLong​(int bitsPerValue)
                      throws IOException
        Read the next long using exactly bitsPerValue bits.
        Throws:
        IOException
      • skipToNextByte

        public void skipToNextByte()
        If there are pending bits (at most 7), they will be ignored and the next value will be read starting at the next byte.