docs: def hex_xformat_decode(s: str) -> Optional[bytes]:
      """
      Reverse :func:`hex_xformat_encode`.
  
      The parameter is a hex-encoded BLOB like
  
      .. code-block:: none
  
          "X'CDE7A24B1A9DBA3148BCB7A0B9DA5BB6A424486C'"
  
      Original purpose and notes:
  
      - SPECIAL HANDLING for BLOBs: a string like ``X'01FF'`` means a hex-encoded
        BLOB. Titanium is rubbish at BLOBs, so we encode them as special string
        literals.
      - SQLite uses this notation: https://sqlite.org/lang_expr.html
      - Strip off the start and end and convert it to a byte array:
        http://stackoverflow.com/questions/5649407
      """
      if len(s) < 3 or not s.startswith("X'") or not s.endswith("'"):
          return None
      return binascii.unhexlify(s[2:-1])