@data.setter
    def data(self, value):
        """
        Set the data to be analyzed by yara.

        This behaves differently based on the processing mode
        being used.

        If set to "raw", data is a simple buffer.

        If set to "fixed_buffer", data will be buffered until that size
        is reached. When reached, the data will automatically be analyzed,
        and the buffer will be cleared. If data is larger than the fixed_buffer
        any extra will be buffered into the next chunk.

        If set to "sliding_window", data will be buffered similar to
        "fixed_buffer" mode. However, the analysis window will increment
        based on the buffer size. For example, with a buffer size set to 5,
        a data stream of '123456789' would be analyzed in the following chunks:

        12345
        23456
        34567
        45678
        56789

        The option "window_step" controls the increment between windows. For
        example, a window step of 2 changes the above example to:

        12345
        34567
        56789

        """
        self._current = value

        if self._processing_mode != 'raw':
            if self._current and \
               len(self._current[self._window_index:]) >= self._buffer_size:
                for chunk in self._window(self._current[self._window_index:],
                                          size=self._buffer_size,
                                          step=self._window_step):
                    # Analyze each chunk and concatenate the results
                    self.analyze(''.join(chunk))

                    if self._processing_mode == 'fixed_buffer':
                        self._offset += len(chunk)
                    elif self._processing_mode == 'sliding_window':
                        self._offset += self._window_step

                # Update the index
                self._window_index = len(self._current)
dataset/ETHPy150Open MITRECND/yaraprocessor/yaraprocessor.py/Processor.data/original