Prepare generating pre-compressed stubs.

This commit is contained in:
Markus F.X.J. Oberhumer
2006-11-21 05:03:25 +01:00
parent c386db2b33
commit 46e8e22236
2 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ def main(argv):
elif opts.compress in ["upx-stub-deflate"]:
odata = zlib.compress(idata, 9)
# strip zlib-header and zlib-trailer (adler32)
odata = odata[2:] + odata[-4:]
odata = odata[2:-4]
assert zlib.decompress(odata, -15) == idata
# encode upx stub header
M_DEFLATE = 15