MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _mk_bitmap

Function _mk_bitmap

tools/python-3.11.9-amd64/Lib/re/_compiler.py:386–389  ·  view source on GitHub ↗
(bits, _CODEBITS=_CODEBITS, _int=int)

Source from the content-addressed store, hash-verified

384MAXCODE = (1 << _CODEBITS) - 1
385_BITS_TRANS = b'0' + b'1' * 255
386def _mk_bitmap(bits, _CODEBITS=_CODEBITS, _int=int):
387 s = bits.translate(_BITS_TRANS)[::-1]
388 return [_int(s[i - _CODEBITS: i], 2)
389 for i in range(len(s), 0, -_CODEBITS)]
390
391def _bytes_to_codes(b):
392 # Convert block indices to word array

Callers 1

_optimize_charsetFunction · 0.85

Calls 1

translateMethod · 0.80

Tested by

no test coverage detected