public final class IntegratedFastPFOR extends Object implements IntegratedIntegerCODEC
This is an integrated version of FastPFOR meaning that it computes differential coding as part of the compression.
It encodes integers in blocks of 128 integers within pages of up to 65536 integers. Note that it is important, to get good compression and good performance, to use sizeable blocks (greater than 1024 integers). For arrays containing a number of integers that is not divisible by 128, you should use it in conjunction with another CODEC:IntegratedIntegerCODEC is = new IntegratedComposition(new IntegratedFastPFOR(), new IntegratedVariableByte())
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
Daniel Lemire, Leonid Boytsov, Nathan Kurz, SIMD Compression and the Intersection of Sorted Integers http://arxiv.org/abs/1401.6399
For multi-threaded applications, each thread should use its own IntegratedFastPFOR object.
You should only use this scheme on sorted arrays. Use FastPFOR if you have unsorted arrays.Constructor and Description |
---|
IntegratedFastPFOR()
Construct the fastPFOR CODEC with default parameters.
|
IntegratedFastPFOR(int pagesize)
Construct the FastPFOR CODEC.
|
Modifier and Type | Method and Description |
---|---|
void |
compress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos)
Compress data in blocks of 128 integers (if fewer than 128 integers
are provided, nothing is done).
|
String |
toString() |
void |
uncompress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos)
Uncompress data in blocks of 128 integers.
|
public IntegratedFastPFOR(int pagesize)
pagesize
- the desired page size (for expert use)public IntegratedFastPFOR()
public void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos)
compress
in interface IntegerCODEC
in
- input arrayinpos
- location in the input arrayinlength
- how many integers to compressout
- output arrayoutpos
- where to write in the output arrayIntegerCODEC.compress(int[], IntWrapper, int, int[], IntWrapper)
public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos)
uncompress
in interface IntegerCODEC
in
- array containing data in compressed forminpos
- where to start reading in the arrayinlength
- length of the compressed data (ignored by some
schemes)out
- array where to write the compressed outputoutpos
- where to write the compressed output in outIntegerCODEC.compress(int[], IntWrapper, int, int[], IntWrapper)
Copyright © 2014. All Rights Reserved.