(bits, _CODEBITS=_CODEBITS, _int=int)
| 384 | MAXCODE = (1 << _CODEBITS) - 1 |
| 385 | _BITS_TRANS = b'0' + b'1' * 255 |
| 386 | def _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 | |
| 391 | def _bytes_to_codes(b): |
| 392 | # Convert block indices to word array |
no test coverage detected