Answer the question
In order to leave comments, you need to log in
How to unpack an inflate stream in python?
There is an Inflate stream that contains the names of the files to be extracted, it is known that the version of zlib 1.2.7 is used.
Need information on how to decompress an Inflate stream using Python (preferred).
zlib.decompress() does not decompress.
It unpacks perfectly if you pass through this function (thanks to the answerer)
def inflate(data):
decompress = zlib.decompressobj(zlib.MAX_WBITS)
inflated = decompress.decompress(data)
inflated += decompress.flush()
return inflated
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question