code: public static int encodeDesc(byte[] value, byte[] dst, int dstOffset) {
          if (value == null) {
              dst[dstOffset] = NULL_BYTE_LOW;
              return 1;
          }
          return encode(value, 0, value.length, dst, dstOffset, -1);
      }
docs: Encodes the given optional unsigned byte array into a variable amount of
  bytes for descending order. If the byte array is null, exactly 1 byte is
  written. Otherwise, the amount written is determined by calling
  calculateEncodedLength.
  
  @param value byte array value to encode, may be null
  @param dst destination for encoded bytes
  @param dstOffset offset into destination array
  @return amount of bytes written