Search found 1 match

by totick
Thu Jan 08, 2015 10:17 am
Forum: Challenges Solved
Topic: Russian Dolls
Replies: 40
Views: 3124

Python solution with help of file signature

import gzip f = open(r"c:\doll.bin", "rb") doll = f.read() i = 1 r = gzip.decompress(doll) while r.startswith(b"\x1f\x8b\x08"): # b"\x1f\x8b\x08" = Hex Signature for gzip file r = gzip.decompress(r) i += 1 print(r) # result print(i) # iteration count List of ...