me.lemire.integercompression
Class S16

java.lang.Object
  extended by me.lemire.integercompression.S16

public final class S16
extends Object

Version of Simple16 for NewPFD and OptPFD.

Adapted by D. Lemire from the Apache Lucene project.


Constructor Summary
S16()
           
 
Method Summary
static int compress(int[] in, int currentPos, int inlength, int[] out, int tmpoutpos)
           
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
static int estimatecompress(int[] in, int currentPos, int inlength)
           
static int fakecompressblock(int[] in, int inOffset, int n)
           
static void uncompress(int[] in, int tmpinpos, int inlength, int[] out, int currentPos, int outlength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

S16

public S16()
Method Detail

compress

public static int compress(int[] in,
                           int currentPos,
                           int inlength,
                           int[] out,
                           int tmpoutpos)

estimatecompress

public static int estimatecompress(int[] in,
                                   int currentPos,
                                   int inlength)

compressblock

public static final int compressblock(int[] out,
                                      int outOffset,
                                      int[] in,
                                      int inOffset,
                                      int n)
Compress an integer array using Simple16

Parameters:
out - the compressed output
outOffset - the offset of the output in the number of integers
in - the integer input array
inOffset - the offset of the input in the number of integers
n - the number of elements to be compressed
Returns:
the number of compressed integers

fakecompressblock

public static final int fakecompressblock(int[] in,
                                          int inOffset,
                                          int n)

decompressblock

public static final int decompressblock(int[] out,
                                        int outOffset,
                                        int[] in,
                                        int inOffset,
                                        int n)
Decompress an integer array using Simple16

Parameters:
out - the decompressed output
outOffset - the offset of the output in the number of integers
in - the compressed input array
inOffset - the offset of the input in the number of integers
n - the number of elements to be compressed
Returns:
the number of processed integers

uncompress

public static void uncompress(int[] in,
                              int tmpinpos,
                              int inlength,
                              int[] out,
                              int currentPos,
                              int outlength)


Copyright © 2013. All Rights Reserved.