def compare(sig1, sig2):
if isinstance(sig1, six.text_type):<EOL><INDENT>sig1 = sig1.encode("<STR_LIT:ascii>")<EOL><DEDENT>if isinstance(sig2, six.text_type):<EOL><INDENT>sig2 = sig2.encode("<STR_LIT:ascii>")<EOL><DEDENT>if not isinstance(sig1, six.binary_type):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % type(sig1)<EOL>)<EOL><DEDENT>if not isinstance(sig2, six.binary_type):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % type(sig2)<EOL>)<EOL><DEDENT>res = binding.lib.fuzzy_compare(sig1, sig2)<EOL>if res < <NUM_LIT:0>:<EOL><INDENT>raise InternalError("<STR_LIT>")<EOL><DEDENT>return res<EOL>
Computes the match score between two fuzzy hash signatures.

Returns a value from zero to 100 indicating the match score of the
two signatures. A match score of zero indicates the signatures
did not match.

:param Bytes|String sig1: First fuzzy hash signature
:param Bytes|String sig2: Second fuzzy hash signature
:return: Match score (0-100)
:rtype: Integer
:raises InternalError: If lib returns an internal error
:raises TypeError: If sig is not String, Unicode or Bytes