/** * Compress an integer array * * @param inputBlock the integer input array * @param bits the value of b in the PForDelta algorithm * @param blockSize the block size which is 256 by default * @return CompResult which contains the compressed size in number of bits and the reference to the compressed data * @throws IllegalArgumentException */ public CompResult compressOneBlock(int[] inputBlock, int bits, int blockSize) throws IllegalArgumentException { int[] compBlock = PForDelta.compressOneBlock(inputBlock, bits, blockSize); CompResult res = new CompResult(); res.setCompressedSize(compBlock.length<<5); res.setCompressedBlock(compBlock); return res; }
outBlock = compressOneBlock(inBlock, currentB, blockSize);
outBlock = compressOneBlock(inBlock, currentB, blockSize);
outBlock = compressOneBlock(inBlock, currentB, blockSize);
outBlock = compressOneBlock(inBlock, currentB, blockSize);
outBlock = compressOneBlock(inBlock, currentB, blockSize);