docs: public static int lenVarInt(long longVal) {
          if (longVal == 0) {
              return 0;
          }
          if (longVal <  0) longVal = -longVal;
          if (longVal < (1L << (7 * 1 - 1))) return 1;  // 6  bits
          if (longVal < (1L << (7 * 2 - 1))) return 2;  // 13 bits
          if (longVal < (1L << (7 * 3 - 1))) return 3;  // 20 bits
          if (longVal < (1L << (7 * 4 - 1))) return 4;  // 27 bits
          if (longVal < (1L << (7 * 5 - 1))) return 5;  // 34 bits
          if (longVal < (1L << (7 * 6 - 1))) return 6;  // 41 bits
          if (longVal < (1L << (7 * 7 - 1))) return 7;  // 48 bits
          if (longVal < (1L << (7 * 8 - 1))) return 8;  // 55 bits
          if (longVal < (1L << (7 * 9 - 1))) return 9;  // 62 bits
          return 10;
      }