Version 3.2.0: fast lists with loading spinners, names from the game files, INT docs and screenshots, cleanup
This commit is contained in:
@@ -14,9 +14,6 @@ class BitReader:
|
||||
self.pos += 1
|
||||
return v
|
||||
|
||||
def bits_left(self) -> int:
|
||||
return len(self.data) * 8 - self.pos
|
||||
|
||||
|
||||
class BitWriter:
|
||||
def __init__(self):
|
||||
@@ -31,13 +28,6 @@ class BitWriter:
|
||||
self.buf[self.pos >> 3] |= 1 << (self.pos & 7)
|
||||
self.pos += 1
|
||||
|
||||
def put_bits_from(self, r: BitReader, n: int):
|
||||
"""Copy n bits from a reader (fast path in 32-bit chunks)."""
|
||||
while n > 0:
|
||||
k = 32 if n >= 32 else n
|
||||
self.put(k, r.get(k))
|
||||
n -= k
|
||||
|
||||
def bytes(self) -> bytes:
|
||||
return bytes(self.buf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user