MCPcopy Create free account
hub / github.com/comaps/comaps / read_string

Function read_string

tools/python/mwm/mwm_python.py:346–349  ·  view source on GitHub ↗
(f, plain: bool = False, decode: bool = True)

Source from the content-addressed store, hash-verified

344
345
346def read_string(f, plain: bool = False, decode: bool = True) -> AnyStr:
347 length = read_varuint(f) + (0 if plain else 1)
348 s = f.read(length)
349 return s.decode("utf-8") if decode else s
350
351
352def read_uint_array(f) -> List[int]:

Callers 5

_read_sections_infoMethod · 0.85
__init__Method · 0.85
metadataMethod · 0.85
get_region_infoFunction · 0.85
read_multilangFunction · 0.85

Calls 2

read_varuintFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected