/** * Compress a block of blockSize integers using Simple16 algorithm * @param outCompBlock the compressed block which is the output * @param outStartOffsetInBits the start offset in bits of the compressed block * @param inBlock the block to be compressed * @param blockSize the block size * @return the compressed size in bits */ private static int compressBlockByS16(int[] outCompBlock, int outStartOffsetInBits, int[] inBlock, int blockSize) { int outOffset = (outStartOffsetInBits+31)>>>5; int num, inOffset=0, numLeft; for(numLeft=blockSize; numLeft>0; numLeft -= num) { num = Simple16.s16Compress(outCompBlock, outOffset, inBlock, inOffset, numLeft, blockSize); outOffset++; inOffset += num; } int compressedBitSize = (outOffset<<5)-outStartOffsetInBits; return compressedBitSize; }
/** * Compress a block of blockSize integers using Simple16 algorithm * @param outCompBlock the compressed block which is the output * @param outStartOffsetInBits the start offset in bits of the compressed block * @param inBlock the block to be compressed * @param blockSize the block size * @return the compressed size in bits */ private int compressBlockByS16(int[] outCompBlock, int outStartOffsetInBits, int[] inBlock, int blockSize) { int outOffset = (outStartOffsetInBits+31)>>>5; int num, inOffset=0, numLeft; for(numLeft=blockSize; numLeft>0; numLeft -= num) { num = Simple16.s16Compress(outCompBlock, outOffset, inBlock, inOffset, numLeft, blockSize); outOffset++; inOffset += num; } int compressedBitSize = (outOffset<<5)-outStartOffsetInBits; return compressedBitSize; }
/** * Compress a block of blockSize integers using Simple16 algorithm * @param outCompBlock the compressed block which is the output * @param outStartOffsetInBits the start offset in bits of the compressed block * @param inBlock the block to be compressed * @param blockSize the block size * @return the compressed size in bits */ private static int compressBlockByS16(int[] outCompBlock, int outStartOffsetInBits, int[] inBlock, int blockSize) { int outOffset = (outStartOffsetInBits+31)>>>5; int num, inOffset=0, numLeft; for(numLeft=blockSize; numLeft>0; numLeft -= num) { num = Simple16.s16Compress(outCompBlock, outOffset, inBlock, inOffset, numLeft, blockSize); outOffset++; inOffset += num; } int compressedBitSize = (outOffset<<5)-outStartOffsetInBits; return compressedBitSize; }
/** * Compress a block of blockSize integers using Simple16 algorithm * @param outCompBlock the compressed block which is the output * @param outStartOffsetInBits the start offset in bits of the compressed block * @param inBlock the block to be compressed * @param blockSize the block size * @return the compressed size in bits */ private static int compressBlockByS16(int[] outCompBlock, int outStartOffsetInBits, int[] inBlock, int blockSize) { int outOffset = (outStartOffsetInBits+31)>>>5; int num, inOffset=0, numLeft; for(numLeft=blockSize; numLeft>0; numLeft -= num) { num = Simple16.s16Compress(outCompBlock, outOffset, inBlock, inOffset, numLeft, blockSize); outOffset++; inOffset += num; } int compressedBitSize = (outOffset<<5)-outStartOffsetInBits; return compressedBitSize; }
/** * Compress a block of blockSize integers using Simple16 algorithm * * @param outCompBlock * the compressed block which is the output * @param outStartOffsetInBits * the start offset in bits of the compressed block * @param inBlock * the block to be compressed * @param blockSize * the block size * @return the compressed size in bits */ private static int compressBlockByS16(int[] outCompBlock, int outStartOffsetInBits, int[] inBlock, int blockSize) { int outOffset = (outStartOffsetInBits + 31) >>> 5; int num, inOffset = 0, numLeft; for (numLeft = blockSize; numLeft > 0; numLeft -= num) { num = Simple16.s16Compress(outCompBlock, outOffset, inBlock, inOffset, numLeft, blockSize); outOffset++; inOffset += num; } int compressedBitSize = (outOffset << 5) - outStartOffsetInBits; return compressedBitSize; }
/** * Compress a block of blockSize integers using Simple16 algorithm * * @param outCompBlock * the compressed block which is the output * @param outStartOffsetInBits * the start offset in bits of the compressed block * @param inBlock * the block to be compressed * @param blockSize * the block size * @return the compressed size in bits */ private static int compressBlockByS16(int[] outCompBlock, int outStartOffsetInBits, int[] inBlock, int blockSize) { int outOffset = (outStartOffsetInBits + 31) >>> 5; int num, inOffset = 0, numLeft; for (numLeft = blockSize; numLeft > 0; numLeft -= num) { num = Simple16.s16Compress(outCompBlock, outOffset, inBlock, inOffset, numLeft, blockSize); outOffset++; inOffset += num; } int compressedBitSize = (outOffset << 5) - outStartOffsetInBits; return compressedBitSize; }