summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoders/common/srdhelper/mod.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/decoders/common/srdhelper/mod.py b/decoders/common/srdhelper/mod.py
index 3c495b4..e37345a 100644
--- a/decoders/common/srdhelper/mod.py
+++ b/decoders/common/srdhelper/mod.py
@@ -25,10 +25,7 @@ def bin2int(s: str):
return int('0b' + s, 2)
def bitpack(bits):
- res = 0
- for i, b in enumerate(bits):
- res |= b << i
- return res
+ return sum([b << i for i, b in enumerate(bits)])
def bitunpack(num, minbits=0):
res = []