GithubHelp home page GithubHelp logo

NBT minifier about mc-repack HOT 2 CLOSED

szeweq avatar szeweq commented on July 2, 2024
NBT minifier

from mc-repack.

Comments (2)

solonovamax avatar solonovamax commented on July 2, 2024

zopfli can be quite slow based on using it in the past, so idk if it's worth using it tbh

here's a test file I ran through it, with the default zopfli iterations (15):

$ time zopfli --gzip -c infwoodfarm.nbt.uncompressed > infwoodfarm.zopfli.nbt

real	0m10.879s
user	0m10.712s
sys	0m0.032s
$ la
total 1.4M
-rw-r--r-- 1 solonovamax solonovamax  91K May  3 12:44 infwoodfarm.nbt
-rw-r--r-- 1 solonovamax solonovamax 1.2M May  3 12:45 infwoodfarm.nbt.uncompressed
-rw-r--r-- 1 solonovamax solonovamax  68K May  3 12:47 infwoodfarm.zopfli.nbt

so, it saved 24kb in 10 seconds, on a 91kb source file. (note: du shows it as being 92kb originally, so I'm using that)

decreasing it to only 5 iterations still takes 0m8.855s, but results in a file that is 72kb.

reducing it further to 1 iteration takes 0m8.263s, and the result is a file that is (also) 72kb.

Using 20 iterations takes 0m11.375s, and the result is a file that is 68kb, and using 80 iterations takes 0m20.615s, with the result being still 86kb 68kb.

but, if there's like even 20 or so nbt files in a mod, 10 seconds for each is quite long.

from mc-repack.

szeweq avatar szeweq commented on July 2, 2024

Feature released in v0.20.0. Issue closed.

from mc-repack.

Related Issues (4)

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.