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

Method __init__

windows/native_exec/simple_x86.py:15–29  ·  view source on GitHub ↗
(self, size, bits)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected