MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / __init__

Method __init__

windows/native_exec/simple_x64.py:18–32  ·  view source on GitHub ↗
(self, size, bits)

Source from the content-addressed store, hash-verified

16
17class BitArray(object):
18 def __init__(self, size, bits):
19 self.size = size
20 if len(bits) > size:
21 raise ValueError("size > len(bits)")
22
23 bits_list = []
24 for bit in bits:
25 x = int(bit)
26 if x not in [0, 1]:
27 raise ValueError("Not expected bits value {0}".format(x))
28 bits_list.append(x)
29
30 self.array = bits_list
31 if size > len(self.array):
32 self.array = ([0] * (size - len(self.array))) + self.array
33
34 def dump(self):
35 res = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected