MCPcopy Create free account
hub / github.com/daniel2005d/mapXplore / get_readable_content

Method get_readable_content

utils/utils.py:61–71  ·  view source on GitHub ↗
(content:bytes)

Source from the content-addressed store, hash-verified

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

Callers 1

get_from_base64Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected