public static int blobVarEncodedLength(int len) {
    if (0 == len) return 2; // 1-byte header + 1-byte terminator
    else return (int) Math.ceil((len * 8) // 8-bits per input byte
      / 7.0) // 7-bits of input data per encoded byte, rounded up
      + 1; // + 1-byte header
  }
Calculate the expected BlobVar encoded length based on unencoded length.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java