private static int roundBits(int bitsRequired){
  int index=Arrays.binarySearch(SUPPORTED_BITS_PER_VALUE,bitsRequired);
  if (index < 0) {
    return SUPPORTED_BITS_PER_VALUE[-index - 1];
  }
 else {
    return bitsRequired;
  }
}

private static int roundBits ( int bitsRequired ) { int index = Arrays . binarySearch ( SUPPORTED_BITS_PER_VALUE , bitsRequired ) ; if ( index < 0 ) { return SUPPORTED_BITS_PER_VALUE [ - index - 1 ] ; } else { return bitsRequired ; } }
round a number of bits per value to the next amount of bits per value that is supported by this writer .
