public static int getVLongSize(long val) {
    int rPos = 0;
    while ((val & ~0x7F) != 0) {
      val >>>= 7;
      rPos++;
    }
    return rPos + 1;
  }
Returns true when {@code range} is of zero length, false otherwise.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractByteRange.java