public class LCPForDelta extends Object
Constructor and Description |
---|
LCPForDelta() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkBigNumbers(int[] inputBlock,
int blockSize,
int bits)
Check if the block contains big numbers that is greater than ((1<<
bits)-1)
|
int |
compress(int[] inBlock,
int blockSize)
Compress one block of blockSize integers using PForDelta with the
optimal parameter b
|
int |
compressOneBlockCore(int[] inputBlock,
int blockSize,
int bits)
The core implementation of compressing a block with blockSize
integers using PForDelta with the given parameter b
|
protected int |
compressOneBlockCore2(int[] inputBlock,
int blockSize,
int bits) |
static int |
decompressBBitSlots(int[] outDecompSlots,
int[] inCompBlock,
int blockSize,
int bits)
Decompress b-bit slots
|
protected static int |
decompressBBitSlotsWithHardCodes(int[] outDecompSlots,
int[] inCompBlock,
int blockSize,
int bits) |
protected static int |
decompressBBitSlotsWithHardCodesWithIntBuffer(int[] outDecompSlots,
IntBuffer inCompBlock,
int blockSize,
int bits) |
static int |
decompressBlockByS16(int[] outDecompBlock,
int[] inCompBlock,
int inStartOffsetInBits,
int blockSize)
Decompress a block of blockSize integers using Simple16 algorithm
|
protected static void |
decompressBlockByS16WithIntBuffer(int[] outDecompBlock,
IntBuffer inCompBlock,
int blockSize) |
protected static void |
decompressBlockByS16WithIntBufferIntegrated(int[] outDecompBlock,
IntBuffer inCompBlock,
int blockSize,
int[] expPosBuffer,
int oribits) |
static void |
decompressOneBlock(int[] decompBlock,
int[] inBlock,
int blockSize)
Decompress one block using PForDelta
|
protected static void |
decompressOneBlockWithSize(int[] decompBlock,
int[] inBlock,
int blockSize,
int[] expPosBuffer,
int[] expHighBitsBuffer,
int inBlockLen) |
protected static void |
decompressOneBlockWithSizeWithIntBuffer(int[] decompBlock,
IntBuffer inBlock,
int blockSize,
int[] expPosBuffer,
int[] expHighBitsBuffer,
int inBlockLen) |
static int |
estimateCompressedSize(int[] inputBlock,
int blockSize,
int bits)
Estimate the compressed size in ints of a block
|
protected int[] |
getCompBuffer() |
static int |
readBits(int[] in,
int inOffset,
int bits)
Read a certain number of bits of an integer into an integer array
starting from the given start offset
|
protected static int |
readBitsWithBuffer(int[] in,
int inOffset,
int bits) |
protected void |
setCompBuffer(int[] buffer) |
static void |
writeBits(int[] out,
int val,
int outOffset,
int bits)
Write a certain number of bits of an integer into an integer array
starting from the given start offset
|
protected int[] getCompBuffer()
protected void setCompBuffer(int[] buffer)
public int compress(int[] inBlock, int blockSize)
inBlock
- the block to be compressedblockSize
- the block sizepublic int compressOneBlockCore(int[] inputBlock, int blockSize, int bits)
inputBlock
- the block to be compressedblockSize
- the block sizebits
- the the value of the parameter bprotected int compressOneBlockCore2(int[] inputBlock, int blockSize, int bits) throws IllegalArgumentException
IllegalArgumentException
public static void decompressOneBlock(int[] decompBlock, int[] inBlock, int blockSize)
decompBlock
- the block that was decompressedinBlock
- the block to be decompressedblockSize
- the number of elements in the decompressed blockprotected static void decompressOneBlockWithSize(int[] decompBlock, int[] inBlock, int blockSize, int[] expPosBuffer, int[] expHighBitsBuffer, int inBlockLen)
protected static void decompressOneBlockWithSizeWithIntBuffer(int[] decompBlock, IntBuffer inBlock, int blockSize, int[] expPosBuffer, int[] expHighBitsBuffer, int inBlockLen)
public static int estimateCompressedSize(int[] inputBlock, int blockSize, int bits)
inputBlock
- the block to be compressedbits
- the value of the parameter bblockSize
- the block sizepublic static boolean checkBigNumbers(int[] inputBlock, int blockSize, int bits)
inputBlock
- the block to be compressedbits
- the numbers of bits to decide whether a number is a
big numberblockSize
- the block sizepublic static int decompressBBitSlots(int[] outDecompSlots, int[] inCompBlock, int blockSize, int bits)
outDecompSlots
- decompressed block which is the outputinCompBlock
- the compressed block which is the inputblockSize
- the block sizebits
- the value of the parameter bprotected static int decompressBBitSlotsWithHardCodes(int[] outDecompSlots, int[] inCompBlock, int blockSize, int bits)
protected static int decompressBBitSlotsWithHardCodesWithIntBuffer(int[] outDecompSlots, IntBuffer inCompBlock, int blockSize, int bits)
public static int decompressBlockByS16(int[] outDecompBlock, int[] inCompBlock, int inStartOffsetInBits, int blockSize)
outDecompBlock
- the decompressed block which is the outputinCompBlock
- the compressed block which is the inputblockSize
- the block sizeinStartOffsetInBits
- the start offset in bits of the compressed blockprotected static void decompressBlockByS16WithIntBuffer(int[] outDecompBlock, IntBuffer inCompBlock, int blockSize)
protected static void decompressBlockByS16WithIntBufferIntegrated(int[] outDecompBlock, IntBuffer inCompBlock, int blockSize, int[] expPosBuffer, int oribits)
public static final void writeBits(int[] out, int val, int outOffset, int bits)
out
- the output arrayval
- the integer to be writtenoutOffset
- the start offset in bits in the output arraybits
- the number of bits to be written (bits greater or equal to 0)public static final int readBits(int[] in, int inOffset, int bits)
in
- the input arrayinOffset
- the start offset in bits in the input arraybits
- the number of bits to be read, unlike writeBits(),
readBits() does not deal with bits==0 and thus bits
must be greater than 0. When bits ==0, the calling functions will
just skip the entire bits-bit slots without decoding
themprotected static final int readBitsWithBuffer(int[] in, int inOffset, int bits)
Copyright © 2014. All Rights Reserved.