public final class S9 extends Object
Adapted by D. Lemire from the Apache Lucene project.
| Constructor and Description |
|---|
S9() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compress(int[] in,
int currentPos,
int inlength,
int[] out,
int tmpoutpos)
Compress an integer array using Simple9
|
static int |
estimatecompress(int[] in,
int currentPos,
int inlength)
Estimate size of the compressed output.
|
static void |
uncompress(int[] in,
int tmpinpos,
int inlength,
int[] out,
int currentPos,
int outlength)
Uncompressed data from an input array into an output array
|
public static int estimatecompress(int[] in,
int currentPos,
int inlength)
in - array to compresscurrentPos - where to start readinginlength - how many integers to readpublic static int compress(int[] in,
int currentPos,
int inlength,
int[] out,
int tmpoutpos)
in - array to compresscurrentPos - where to start readinginlength - how many integers to readout - output arraytmpoutpos - location in the output arraypublic static void uncompress(int[] in,
int tmpinpos,
int inlength,
int[] out,
int currentPos,
int outlength)
in - input array (in compressed form)tmpinpos - starting location in the compressed input arrayinlength - how much data we wish the read (in 32-bit words)out - output array (in decompressed form)currentPos - current position in the output arrayoutlength - available data in the output arrayCopyright © 2015. All Rights Reserved.