Giter Site home page Giter Site logo

Comments (2)

mansuf avatar mansuf commented on June 2, 2024

I forgot to put example usage in the docs how to use compression for cbz and epub formats, sorry about that.

Basically, you need to set 2 environments to enable compression

  • MANGADEXDL_ZIP_COMPRESSION_TYPE
  • MANGADEXDL_ZIP_COMPRESSION_LEVEL

By default, MANGADEXDL_ZIP_COMPRESSION_TYPE is set to stored which means the archive is not compressed at all. So you need to set it to other than stored (deflated, bzip2, lzma)

set MANGADEXDL_ZIP_COMPRESSION_TYPE=deflated
set MANGADEXDL_ZIP_COMPRESSION_LEVEL=1
mangadex-dl.exe "https://mangadex.org/chapter/9f20eb08-abe9-4fb6-acde-5f85049fe24d" --save-as cbz

As you seen in the docs, if you set MANGADEXDL_ZIP_COMPRESSION_TYPE to lzma, environment MANGADEXDL_ZIP_COMPRESSION_LEVEL has no effect at all.

set MANGADEXDL_ZIP_COMPRESSION_TYPE=lzma
mangadex-dl.exe "https://mangadex.org/chapter/9f20eb08-abe9-4fb6-acde-5f85049fe24d" --save-as cbz

Why is no compression even the default? Deflated level 1 is producing a noticeable difference with jpegs (like 230kb -> 191kb), while higher levels doesn't do much (deflated L9 189kb, other compression type are also similar).
I'd guess that deflated level 1 has negligible impact on compression and decompression speeds, and there are no compatibility issues either, I don't see drawbacks with it.

The reason i did this because some systems may not have required modules to do compression stuff. Maybe you thinking that you have all requirements, but i'm thinking about the other users. Also it saves time for me to debug errors.

from mangadex-downloader.

NLZ avatar NLZ commented on June 2, 2024

Ah thanks, specifying both MANGADEXDL_ZIP_COMPRESSION_TYPE and MANGADEXDL_ZIP_COMPRESSION_LEVEL indeed works.

from mangadex-downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.