package.py 446 B

12345678910111213141516171819
  1. class package:
  2. @staticmethod
  3. def _get_encoding() -> str:
  4. return str("UTF-8")
  5. def __init__(self, content: str) -> None:
  6. self.__content = content.encode("UTF-8")
  7. @property
  8. def size(self) -> int:
  9. return len(self.content)
  10. @property
  11. def content(self) -> bytes:
  12. return self.__content
  13. def get_part(self, begin: int, end: int) -> None:
  14. return self.__content[begin: end]