Commit 5513e22e authored by wanli's avatar wanli

update

parent 693a80b7
......@@ -11,7 +11,6 @@ import zlib
import pprint
import hashlib
def str_to_hex(s):
return ' '.join([hex(ord(c)).replace('0x', '') for c in s])
......@@ -76,7 +75,6 @@ class EpkApp(object):
}
if self._infoPath == os.sep.join([path, fname]):
print(finfo)
files.insert(0, finfo)
else:
files.append(finfo)
......@@ -134,15 +132,10 @@ class EpkApp(object):
with open(fpath, "rb") as fc:
fileContentBytes = fc.read()
print(info["name"])
print(len(fileContentBytes))
fileBytes += struct.pack("<L", len(fileContentBytes))
fileCompressBytes = zlib.compress(fileContentBytes, level)
print(len(fileCompressBytes))
fileBytes += struct.pack("<L", len(fileCompressBytes))
fileBytes += fileCompressBytes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment