decode.py 315 B

1234567891011
  1. from .exceptions import abstract
  2. class decode:
  3. def _decode_bytes(self, content: str) -> bytes:
  4. return bytes.fromhex(content)
  5. def _decode_str(self, content: str) -> str:
  6. return bytes.fromhex(content).decode("utf-8")
  7. def decode(self) -> object | str | bytes:
  8. raise abstract()