def _run(data, cache_append, key, table, index):
        """Encrypt the data with the given arguments.

        To run the encryption process as fast as possible, methods are
        cached as names. As the algorithm operates, only recognized bytes
        are encoded while running through the selective processing loop."""
        encode, index_append = key.encode, index.append
        for byte in data:
            if byte in table:
                index_append(table[byte])
                cache_append(encode(index))
            else:
                cache_append(byte)
Encrypt the data with the given arguments.

        To run the encryption process as fast as possible, methods are
        cached as names. As the algorithm operates, only recognized bytes
        are encoded while running through the selective processing loop.
recipes/Python/578075_Markov_Encryption_Module/recipe-578075.py