ForDeltaUtil

Inspired from https://fulmicoton.com/posts/bitpacking/ Encodes multiple integers in a Java int to get SIMD-like speedups. If bitsPerValue <= 4 then we pack 4 ints per Java int else if bitsPerValue <= 11 we pack 2 ints per Java int else we use scalar operations.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Return the number of bits per value required to store the given array containing strictly positive numbers.

Link copied to clipboard
fun decodeAndPrefixSum(bitsPerValue: Int, pdu: PostingDecodingUtil, base: Int, ints: IntArray)

Delta-decode 128 integers into ints.

Link copied to clipboard
fun encodeDeltas(bitsPerValue: Int, ints: IntArray, out: DataOutput)

Encode deltas of a strictly monotonically increasing sequence of integers. The provided ints are expected to be deltas between consecutive values.