Implement zstd compression and PNG optimization - #162
Open
dankmeme01 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loader v5.9.0 added support for unzipping Zstd entries in archives, so the new flags are gated behind target Geode version being v5.9.0 or higher.
mod.jsonis always deflated, so older Geode versions can read metadata in a.geodefile with no problems.The new
--zstdflag applies togeode package new(local builds, intermediary single-platform CI builds) to apply level 3 Zstd compression and togeode package mergeto apply level 18 compression. Level 3 is the default level and is good for development/intermediary artifacts, while level 18 takes a lot more time and is good for release builds.For example, stats for the Globed DLL:
Zstd absolutely stomps the competition by being smaller and faster to compress on low levels. High levels shine with reduced sizes and still blazing fast decompression speeds (level 18 will still be unzipped much faster than regular deflate, so faster mod load times)
On top of that,
oxipngis now used to more efficiently compress.pngfiles in the final merged mod, if the--optimize-pngsflag is passed. This yields pretty significant size improvements yet again, at the cost of taking some extra time (for example Globed resources go from 9.1 MiB to 7.2 MiB). The compression is lossless and has no negative impact on texture load time.