| 189 | ################################################################################ |
| 190 | |
| 191 | class Decrypter(_Processor): |
| 192 | |
| 193 | slots() |
| 194 | |
| 195 | @staticmethod |
| 196 | def _run(data, cache_push, key, table, index): |
| 197 | index_pop, decode, index_push = index.popleft, key.decode, index.append |
| 198 | for char in data: |
| 199 | if char in table: |
| 200 | index_pop() |
| 201 | value = decode(index, table[char]) |
| 202 | cache_push(value) |
| 203 | index_push(table[value]) |
| 204 | else: |
| 205 | cache_push(char) |
| 206 | |
| 207 | ################################################################################ |
| 208 | |