(content:bytes)
| 59 | return True |
| 60 | |
| 61 | def get_readable_content(content:bytes)->str: |
| 62 | text = "" |
| 63 | allowed_bytes = set(range(32, 127)) | {10,13} | {241,243,250} |
| 64 | |
| 65 | for byte in content: |
| 66 | if byte not in allowed_bytes: |
| 67 | text+=" " |
| 68 | else: |
| 69 | text+=chr(byte) |
| 70 | |
| 71 | return text |
| 72 | |
| 73 | |
| 74 | @staticmethod |