Class FastPFOR

java.lang.Object
me.lemire.integercompression.FastPFOR
All Implemented Interfaces:
IntegerCODEC, SkippableIntegerCODEC

public class FastPFOR extends Object implements IntegerCODEC, SkippableIntegerCODEC
This is a patching scheme designed for speed. It encodes integers in blocks of integers within pages of up to 65536 integers. Note that it is important, to get good compression and good performance, to use sizeable arrays (greater than 1024 integers). For arrays containing a number of integers that is not divisible by BLOCK_SIZE, you should use it in conjunction with another CODEC: IntegerCODEC ic = new Composition(new FastPFOR(), new VariableByte()).

For details, please see:

Daniel Lemire and Leonid Boytsov, Decoding billions of integers per second through vectorization Software: Practice & Experience http://onlinelibrary.wiley.com/doi/10.1002/spe.2203/abstract http://arxiv.org/abs/1209.2137

For sufficiently compressible and long arrays, it is faster and better than other PFOR schemes.

Note that this does not use differential coding: if you are working on sorted lists, you should first compute deltas, @see me.lemire.integercompression.differential.Delta#delta. For multi-threaded applications, each thread should use its own FastPFOR object.
Author:
Daniel Lemire