aerkalov / ebooklib

Python E-book library for handling books in EPUB2/EPUB3 format -
https://ebooklib.readthedocs.io/
GNU Affero General Public License v3.0
1.47k stars 229 forks source link

Add compresslevel #273

Closed judelgadoc closed 2 months ago

judelgadoc commented 1 year ago

Hi :smile:, this PR resolves #271

Usage of the changes:

epub.write_epub('test.epub', book, {"compresslevel": 9})

Allowed values for compresslevel are 0 to 9 - see ZipFile docs The default value is 6, it's also possible to use None with same effect

aerkalov commented 2 months ago

Thanks for this!