(self, data: bytes)
| 90 | self.substitutions = {} |
| 91 | |
| 92 | def substitute(self, data: bytes) -> str: |
| 93 | idx = hash(data) |
| 94 | self.substitutions[idx] = data |
| 95 | return self.TEMPLATE.format(idx) |
| 96 | |
| 97 | def decode(self, data: str) -> Union[str, bytes]: |
| 98 | if self.STR_PATTERN.search(data) is None: |