code: def _archive_write_data(archive, data):
      
  
      n = libarchive.calls.archive_write.c_archive_write_data(
              archive,
              ctypes.cast(ctypes.c_char_p(data), ctypes.c_void_p),
              len(data))
  
      if n == 0:
          message = c_archive_error_string(archive)
          raise ValueError("No bytes were written. Error? [%s]" % (message))
docs: Write data to archive. This will only be called with a non-empty string.