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

Function read_varuint

tools/python/mwm/mwm_python.py:446–461  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

444
445
446def read_varuint(f) -> int:
447 res = 0
448 shift = 0
449 more = True
450 while more:
451 b = f.read(1)
452 if not b:
453 return res
454 try:
455 bc = ord(b)
456 except TypeError:
457 bc = b
458 res |= (bc & 0x7F) << shift
459 shift += 7
460 more = bc >= 0x80
461 return res
462
463
464def zigzag_decode(uint: int) -> int:

Callers 15

_read_osm2ft_v0Function · 0.90
_read_osm2ft_v1Function · 0.90
__init__Method · 0.85
__len__Method · 0.85
_read_sections_infoMethod · 0.85
_read_versionMethod · 0.85
__next__Method · 0.85
__init__Method · 0.85
metadataMethod · 0.85
get_region_infoFunction · 0.85
read_pointFunction · 0.85
read_stringFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected