def update(self, buf, encoding="<STR_LIT:utf-8>"):
if self._state == ffi.NULL:<EOL><INDENT>raise InternalError("<STR_LIT>")<EOL><DEDENT>if isinstance(buf, six.text_type):<EOL><INDENT>buf = buf.encode(encoding)<EOL><DEDENT>if not isinstance(buf, six.binary_type):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % type(buf)<EOL>)<EOL><DEDENT>if binding.lib.fuzzy_update(self._state, buf, len(buf)) != <NUM_LIT:0>:<EOL><INDENT>binding.lib.fuzzy_free(self._state)<EOL>raise InternalError("<STR_LIT>")<EOL><DEDENT>
Feed the data contained in the given buffer to the state.

:param String|Byte buf: The data to be hashed
:param String encoding: Encoding is used if buf is String
:raises InternalError: If lib returns an internal error
:raises TypeError: If buf is not Bytes, String or Unicode