public final class Simple16 extends Object implements IntegerCODEC, SkippableIntegerCODEC
Adapted by D. Lemire from the Apache Lucene project.
| Constructor and Description |
|---|
Simple16() |
| 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.
|
static int |
compressblock(int[] out,
int outOffset,
int[] in,
int inOffset,
int n)
Compress an integer array using Simple16
|
static int |
decompressblock(int[] out,
int outOffset,
int[] in,
int inOffset,
int n)
Decompress an integer array using Simple16
|
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 num)
Uncompress data from an array to another array.
|
String |
toString() |
static void |
uncompress(int[] in,
int tmpinpos,
int inlength,
int[] out,
int currentPos,
int outlength)
Uncompress data from an array to another array.
|
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)
SkippableIntegerCODECheadlessCompress in interface SkippableIntegerCODECin - input arrayinpos - location in the input arrayinlength - how many integers to compressout - output arrayoutpos - where to write in the output arraypublic static final int compressblock(int[] out,
int outOffset,
int[] in,
int inOffset,
int n)
out - the compressed outputoutOffset - the offset of the output in the number of integersin - the integer input arrayinOffset - the offset of the input in the number of integersn - the number of elements to be compressedpublic static final int decompressblock(int[] out,
int outOffset,
int[] in,
int inOffset,
int n)
out - the decompressed outputoutOffset - the offset of the output in the number of integersin - the compressed input arrayinOffset - the offset of the input in the number of integersn - the number of elements to be compressedpublic void headlessUncompress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos,
int num)
SkippableIntegerCODECheadlessUncompress in interface SkippableIntegerCODECin - 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 outnum - number of integers we want to decode, the actual number of integers decoded can be lesspublic static void uncompress(int[] in,
int tmpinpos,
int inlength,
int[] out,
int currentPos,
int outlength)
in - array containing data in compressed formtmpinpos - where to start reading in the arrayinlength - length of the compressed data (ignored by some schemes)out - array where to write the compressed outputcurrentPos - where to write the compressed output in outoutlength - number of integers we want to decodepublic void compress(int[] in,
IntWrapper inpos,
int inlength,
int[] out,
IntWrapper outpos)
IntegerCODECcompress in interface IntegerCODECin - 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)
IntegerCODECuncompress in interface IntegerCODECin - 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.