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

Method is_readable

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

Source from the content-addressed store, hash-verified

51
52 @staticmethod
53 def is_readable(content:bytes)->bool:
54 allowed_bytes = set(range(32, 127)) | {10,13} | {241,243,250}
55
56 for byte in content:
57 if byte not in allowed_bytes:
58 return False
59 return True
60
61 def get_readable_content(content:bytes)->str:
62 text = ""

Callers 1

get_from_base64Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected