Beispiel #1
0
def dump_headers(headers):
    if len(headers) > 1:
        ans = bitwise_mode([np.fromstring(h, dtype=np.uint8) for h in headers])
        ans = "".join([chr(x) for x in ans])
    else:
        ans = headers[0]

    sys.stdout.write(ans)
 def squash(self, pages):
     return bitwise_mode([x.array for x in pages])
Beispiel #3
0
 def top_fragments(self):
     sorttmp = [(len(u),n,bitwise_mode(u)) for n,u in enumerate(self.fragments)]
     sorttmp.sort(reverse=True)
     return sorttmp