public final class NewPFDS16 extends Object implements IntegerCODEC, SkippableIntegerCODEC
Follows:
H. Yan, S. Ding, T. Suel, Inverted index compression and query processing with optimized document ordering, in: WWW 09, 2009, pp. 401-410.
using Simple16 as the secondary coder. It encodes integers in blocks of 128 integers. For arrays containing an arbitrary number of integers, you should use it in conjunction with another CODEC:
IntegerCODEC ic = new Composition(new PDFS16(), new VariableByte()).Note that this does not use differential coding: if you are working on sorted lists, you must compute the deltas separately. For multi-threaded applications, each thread should use its own NewPFDS16 object.
Constructor and Description |
---|
NewPFDS16()
Constructor for the NewPFDS16 CODEC.
|
Modifier and Type | Method and Description |
---|---|
void |
compress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos)
Compress data from an array to another array.
|
void |
headlessCompress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos)
Compress data from an array to another array.
|
void |
headlessUncompress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos,
int mynvalue)
Uncompress data from an array to another array.
|
String |
toString() |
void |
uncompress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos)
Uncompress data from an array to another array.
|
public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos)
SkippableIntegerCODEC
headlessCompress
in interface SkippableIntegerCODEC
in
- input arrayinpos
- location in the input arrayinlength
- how many integers to compressout
- output arrayoutpos
- where to write in the output arraypublic void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos, int mynvalue)
SkippableIntegerCODEC
headlessUncompress
in interface SkippableIntegerCODEC
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 outmynvalue
- number of integers we want to decode, the actual number of integers decoded can be lesspublic void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos)
IntegerCODEC
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 arraypublic void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos)
IntegerCODEC
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 outCopyright © 2015. All Rights Reserved.