code: public static int[] compressOneBlockOpt(final int[] inBlock,
                  int blockSize) {
                  // find the best b that may lead to the smallest overall
                  // compressed size
                  int currentB = POSSIBLE_B[0];
                  int[] outBlock = null;
                  int tmpB = currentB;
                  // deal with the large exception cases
                  boolean hasBigNum = checkBigNumbers(inBlock,
                          POSSIBLE_B[POSSIBLE_B.length - 1], blockSize);
                  if (hasBigNum) {
                          currentB = 4;
                          System.out.println("has big num and the currentB is: "
                                  + currentB);
                  } else {
                          int optSize = estimateCompressedSize(inBlock, tmpB,
                                  blockSize);
                          for (int i = 1; i < POSSIBLE_B.length; ++i) {
                                  tmpB = POSSIBLE_B[i];
                                  int curSize = estimateCompressedSize(inBlock,
                                          tmpB, blockSize);
                                  if (curSize < optSize) {
                                          currentB = tmpB;
                                          optSize = curSize;
                                  }
                          }
                  }
  
                  // compress the block using the above best b
                  outBlock = compressOneBlock(inBlock, currentB, blockSize);
  
                  return outBlock;
          }
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