Skip to content

Commit 5da3653

Browse files
committed
Small optimization for buffer.read edge case
1 parent fced0f4 commit 5da3653

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sc2reader/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def read(self, bytes=0, bits=0):
407407

408408
#check special case of byte-aligned reads, performance booster
409409
if self.bit_shift == 0:
410-
base = [ord(self.read_basic(1)) for byte in range(bytes)]
410+
base = map(ord, map(self.read_basic, [1]*bytes))
411411
if bits != 0:
412412
return base+[self.shift(bits)]
413413
return base

0 commit comments

Comments
 (0)