docs: def update(self, buf, encoding="utf-8"):
          """
           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
  
          """
  
          if self._state == ffi.NULL:
              raise InternalError("State object is NULL")
  
          if isinstance(buf, six.text_type):
              buf = buf.encode(encoding)
  
          if not isinstance(buf, six.binary_type):
              raise TypeError(
                  "Argument must be of string, unicode or bytes type not "
                  "'%r'" % type(buf)
              )
  
          if binding.lib.fuzzy_update(self._state, buf, len(buf)) != 0:
              binding.lib.fuzzy_free(self._state)
              raise InternalError("Invalid state object")