code: private int staticEncodingLength(GenericPropertyInfo info) {
          TypeDesc type = info.getStorageType();
          TypeDesc primType = type.toPrimitiveType();
  
          if (primType == null) {
              if (info.isLob()) {
                  // Lob locator is stored as a long.
                  return 8;
              }
          } else {
              if (info.isNullable()) {
                  // Type is a primitive wrapper.
                  switch (primType.getTypeCode()) {
                  case TypeDesc.BYTE_CODE:
                      return ~1;
                  case TypeDesc.BOOLEAN_CODE:
                      return 1;
                  case TypeDesc.SHORT_CODE:
                  case TypeDesc.CHAR_CODE:
                      return ~1;
                  case TypeDesc.INT_CODE:
                      return ~1;
                  case TypeDesc.FLOAT_CODE:
                      return 4;
                  case TypeDesc.LONG_CODE:
                      return ~1;
                  case TypeDesc.DOUBLE_CODE:
                      return 8;
                  }
              } else {
                  // Type is primitive or a required primitive wrapper.
                  switch (type.getTypeCode()) {
                  case TypeDesc.BYTE_CODE:
                  case TypeDesc.BOOLEAN_CODE:
                      return 1;
                  case TypeDesc.SHORT_CODE:
                  case TypeDesc.CHAR_CODE:
                      return 2;
                  case TypeDesc.INT_CODE:
                  case TypeDesc.FLOAT_CODE:
                      return 4;
                  case TypeDesc.LONG_CODE:
                  case TypeDesc.DOUBLE_CODE:
                      return 8;
                  }
              }
          }
  
          return ~0;
      }
docs: Returns a negative value if encoding is variable. The minimum static
  amount is computed from the one's compliment. Of the types with variable
  encoding lengths, only for primitives is the minimum static amount
  returned more than zero.