MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / b64

Function b64

src/ifcopenshell-python/test/test_guid.py:62–63  ·  view source on GitHub ↗
(v, l=4)

Source from the content-addressed store, hash-verified

60 bs = [int(g[i : i + 2], 16) for i in range(0, len(g), 2)]
61
62 def b64(v, l=4):
63 return "".join([chars[(v // (64**i)) % 64] for i in range(l)][::-1])
64
65 return "".join([b64(bs[0], 2)] + [b64((bs[i] << 16) + (bs[i + 1] << 8) + bs[i + 2]) for i in range(1, 16, 3)])
66

Callers 2

legacy_compressFunction · 0.85
legacy_expandFunction · 0.85

Calls 3

indexMethod · 0.80
rangeFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected