code: public static int encodeDesc(Character value, byte[] dst, int dstOffset) {
          if (value == null) {
              dst[dstOffset] = NULL_BYTE_LOW;
              return 1;
          } else {
              dst[dstOffset] = NOT_NULL_BYTE_LOW;
              DataEncoder.encode((char) ~value.charValue(), dst, dstOffset + 1);
              return 3;
          }
      }
docs: Encodes the given Character object into exactly 1 or 3 bytes for
  descending order. If the Character object is never expected to be null,
  consider encoding as a char primitive.
  
  @param value optional Character value to encode
  @param dst destination for encoded bytes
  @param dstOffset offset into destination array
  @return amount of bytes written