public static int estimateCompressedSize(int[] inputBlock, int bits,
                int blockSize)  {
                int maxNoExp = (1 << bits) - 1;
                // Size of the header and the bits-bit slots
                int outputOffset = HEADER_SIZE + bits * blockSize;
                int expNum = 0;

                for (int i = 0; i < blockSize; ++i) {
                        if (inputBlock[i] > maxNoExp) {
                                expNum++;
                        }
                }
                outputOffset += (expNum << 5);

                return outputOffset;
        }
public static int estimateCompressedSize ( int [ ] inputBlock , int bits , int blockSize ) { int maxNoExp = ( 1 << bits ) - 1 ; int outputOffset = HEADER_SIZE + bits * blockSize ; int expNum = 0 ; for ( int i = 0 ; i < blockSize ; ++ i ) { if ( inputBlock [ i ] > maxNoExp ) { expNum ++ ; } } outputOffset += ( expNum << 5 ) ; return outputOffset ; }
Estimate the compressed size in ints of a block

@param inputBlock
the block to be compressed
@param bits
the value of the parameter b
@param blockSize
the block size
@return the compressed size in ints