From 232bac00a9923589c98c43c59abe64ebdc13dab9 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 6 Apr 2026 21:03:17 -0700 Subject: [PATCH] ZIP stored instead of deflate (#1283) --- kindlecomicconverter/comic2ebook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index f87f6b5..aa7e495 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -1295,12 +1295,12 @@ def makeZIP(zipfilename, basedir, job_progress='', isepub=False): mimetypeFile = open(os.path.join(basedir, '!mimetype'), 'w') mimetypeFile.write('application/epub+zip') mimetypeFile.close() - subprocess_run([SEVENZIP, 'a', '-tzip', zipfilename, "*"], capture_output=True, check=True, cwd=basedir) + subprocess_run([SEVENZIP, 'a', '-mx0', '-tzip', zipfilename, "*"], capture_output=True, check=True, cwd=basedir) # crazy hack to ensure mimetype is first when using 7zip if isepub: subprocess_run([SEVENZIP, 'rn', zipfilename, '!mimetype', 'mimetype'], capture_output=True, check=True, cwd=basedir) else: - zipOutput = ZipFile(zipfilename, 'w', ZIP_DEFLATED) + zipOutput = ZipFile(zipfilename, 'w', ZIP_STORED) if isepub: zipOutput.writestr('mimetype', 'application/epub+zip', ZIP_STORED) for dirpath, _, filenames in os.walk(basedir):