code: public int compress(int[] inBlock, int blockSize) {
                  // find the best b that can lead to the smallest overall
                  // compressed size
                  int currentB = POSSIBLE_B[0];
                  int tmpB = currentB;
                  boolean hasBigNum = checkBigNumbers(inBlock, blockSize,
                          POSSIBLE_B[POSSIBLE_B.length - 1]);
                  if (hasBigNum) {
                          currentB = 4;
                  } else {
                          int optSize = estimateCompressedSize(inBlock,
                                  blockSize, tmpB);
                          for (int i = 1; i < POSSIBLE_B.length; ++i) {
                                  tmpB = POSSIBLE_B[i];
                                  int curSize = estimateCompressedSize(inBlock,
                                          blockSize, tmpB);
                                  if (curSize < optSize) {
                                          currentB = tmpB;
                                          optSize = curSize;
                                  }
                          }
                  }
  
                  // compress the block using the above best b
                  int compressedSizeInInts = compressOneBlockCore(inBlock,
                          blockSize, currentB);
  
                  return compressedSizeInInts;
          }
docs: Compress one block of blockSize integers using PForDelta with the
  optimal parameter b
  
  @param inBlock
  the block to be compressed
  @param blockSize
  the block size
  @return the compressed block