默认开启有损压缩,追求无损需手动关闭量化与降采样;着色器优化存在已知限制,部分着色器需调整;复用上次 ZIP、去重与保护等能力默认关闭,需自行启用

PackSquash
ComunidadAylasAGPL-3.0活跃维护针对 Minecraft Java 版资源包和数据包做极致压缩的优化器,在保证性能的同时缩小包体积、加快游戏内加载并增强分发保护。
📦 Minecraft: Java Edition resource and data pack optimizer which aims to achieve the best possible compression, performance and protection, improving pack distribution, storage and in-game load times.
README 未给出具体安装命令,请参考其 Getting started 指南README 未说明
Minecraft Java 版资源包与数据包优化器,压缩体积并缩短加载时间
针对 Minecraft Java 版资源包和数据包做极致压缩的优化器,在保证性能的同时缩小包体积、加快游戏内加载并增强分发保护。
核心能力
- 对 PNG 做调色板量化与无损位深压缩
- 用 Zopfli 对 Ogg 和 PNG 做无损再压缩
- 音频转码 Vorbis 并用 OptiVorbis 两遍校验
- 压缩 JSON、着色器与 .lang 文件并做基础校验
- 可复用上次 ZIP 跳过未变文件以加速增量构建
容易踩的坑
- v0.4.1最新正式版2026-01-01 · 2026-01-01 19:35 UTC
For information about how to use PackSquash, please check out the getting started guide and the options files documentation.
🔍 Overview
v0.4.1 is a minor (i.e., non-breaking) update to PackSquash, but that doesn't make it any less important: it brings numerous fixes, tweaks, and new features to a wider audience. These improvements were previously only available in unstable PackSquash builds, where they remained for quite some time before making it into this official release. Some user-facing highlights include:
- ✅ Better compatibility with modern packs:
- Packs generated with the
disregardZIP conformance level now work in Minecraft versions using Java 22+. - Newer resource and data pack files are handled correctly instead of being skipped.
- Several shader mis-optimization issues have been fixed with no user workarounds required.
- Packs generated with the
- 🖼️ PNG obfuscation: protect textures from being easily viewed outside Minecraft with the new
png_obfuscationoption. - 💬 ZIP comments: add custom comment strings to generated ZIP files with the new
zip_commentoption. This provides an alternative to embedding text files in your pack for conveying information about it, which you may find better suited for your use case. - 📦 NBT optimization: datapack
.nbtfiles now use a dedicated compression algorithm. - 🔤 JSON key sorting: JSON object keys are now sorted by default for better compression and reproducibility. Control this per file with the
sort_json_object_keysoption. - 🚀 Better performance: static Linux binaries (used by the GitHub Action) are ~5× faster. Zopfli compression is ~15% faster, large textures are optimized up to ~30% faster, and real-world packs have been observed to end up ~25% smaller.
📌 Changelog
For a detailed list of all changes, please see the
CHANGELOG.mdfile in the repository.⬆️ Upgrading from v0.4.0
Upgrading to PackSquash v0.4.1 should be straightforward: it accepts the same options as v0.4.0 but more, essentially functioning as an improved v0.4.0. If you're running Linux, note that glibc binaries now require glibc 2.36 or newer. However, this shouldn't be a concern if your distribution is up to date or if you're using the PackSquash Docker image.
The PackSquash GitHub action has also been updated to work with this release.
🌟 Hall of fame
Every community contribution matters and is equally valued. That said, we'd like to use this release as an opportunity to give a shout-out to those who, during the development of this version, went beyond the usual level of involvement with concrete actions that had a lasting effect on the project, in no particular order:
- @Spongecade, for submitting PR https://github.com/ComunidadAylas/PackSquash/pull/256.
- @emmanuel-ferdman, for submitting PR https://github.com/ComunidadAylas/PackSquash/pull/332.
- @ChenCMD, for submitting PR https://github.com/ComunidadAylas/PackSquash/pull/366.
- @ZebulanStanphill, for submitting PR https://github.com/ComunidadAylas/PackSquash/pull/372.
- @MrKinau, for repeatedly helping people on Discord by answering support questions with spot-on guidance, without ever being asked to.
- @AmberFrost, for designing the current PackSquash logo and artwork.
Thank you to all of you, including those who contributed more quietly, for making PackSquash better!
📝 An honest maintainer reflection
As a matter of fact, this is the first PackSquash release in... two years. A lot has happened in that time, both for me personally and in the wider world. To the most casual external observer, one oblivious to what goes on in our Discord server, to the steady work that happened on the main branc
- ✅ Better compatibility with modern packs:
- v0.4.02023-06-25 · 2023-06-25 11:46 UTC
查看更新说明
For information about how to use PackSquash, please check out the getting started guide and the options files documentation.
🔍 Overview
v0.4.0 is a major update to PackSquash. Originally planned as a fundamental update that would include a new, easy-to-use graphical user interface and extensive redesigns to the code structure and compression techniques, we have decided to scale it back due to the long development cycle of the planned changes to keep a healthy release cadence, and to address some of the user needs and feedback that has accumulated during this time. Nevertheless, v0.4.0 still packs a punch, including significant fixes and texture and sound processing improvements that significantly reduce run times and pack sizes: a 50% improvement in runtime is common for packs with lots of textures and sound files. Rest assured that the changes we had originally planned for v0.4.0 are still being worked on and will make it to future releases.
By the way, we have posted several development announcements on our Discord server since the last release was made, so please consider joining if you want to stay on top of the latest PackSquash news. Joining our Discord server is also a great way to get in touch with us to collaborate: any contributions are welcome!
📌 Changelog
Starting with this release, we are keeping changelogs in a repository file. Please check it out to see what has changed.
⬆️ Upgrading from v0.3.1
PackSquash v0.4.0 no longer requires GStreamer to work, but makes several incompatible changes to the options file format and drops AppImages in favor of static binaries for Linux platforms. Please see the updated documentation and the changelog for more details on how to get PackSquash and what options have changed. After upgrading to v0.4.0, feel free to uninstall GStreamer if no other application on your system depends on a system-wide GStreamer installation.
The PackSquash GitHub action has also been updated to work with this release.
📝 Acknowledgements
We are so appreciative of the support and constructive feedback we have received from the community during this journey ❤️
To that end, we are adopting the All Contributors specification to recognize and visibilize the efforts of our contributors in helping the project. You can find a beautiful list of awesome people who have contributed to the project here. If we have not added you there, but you think you should be credited as a contributor, please contact us.
- v0.3.12022-04-06 · 2022-04-06 21:48 UTC
查看更新说明
These are the downloads and release notes for the PackSquash v0.3.1 release.
For information about how to install and use PackSquash, please see the installation guide and the options files documentation.
v0.3.1 is a patch update for v0.3.0, focused on fixing most known defects, introducing backward-compatible tweaks and improvements, and preparing its codebase for more extensive upgrades that will come in the future. Most users are encouraged to update to v0.3.1 at their convenience, which is meant to be a drop-in replacement for v0.3.0.
Nonetheless, those using PackSquash on computers with so underpowered x64 CPUs, in unsupported scenarios (i.e., for Bedrock Edition packs), passing uncommon combinations of non-default values for some options, optimizing packs that contain audio files encoded with uncommon parameters, or using PackSquash on Linux distros that ship older software may find incompatibilities. Please check the changelog below for more detailed information about these incompatibilities.
Additions
- As requested in #44, basic support for Minecraft 1.17 include shaders was added. Please note that PackSquash is, for now, more restrictive than Minecraft when parsing these files, imposing that they must be a syntactically valid translation unit by themselves. In other words, include shaders that would only be valid within an external declaration of another shader, such as those containing only variable assignment expressions, are not accepted. We are looking forward to lifting this restriction in the future. Thanks to Ancientkingg#0420 over Discord for making me notice this quirk.
- Language files used in Minecraft 1.12.2 and older versions are now fully supported. Thanks to a Discord user whose nickname I can't find right now for bringing this to my attention.
- Added support for the resource pack assets used by the Custom Resources feature of the Minecraft Transit Railway mod, major version 3. Thank you @Kenny-Hui for getting in touch over Discord to suggest this improvement and for your keenness to answer technical questions about the mod. The tracking issue for this feature is #42.
- Custom assets can now be defined in options files by setting the file-specific option
force_includetotrue. This option is honored by PackSquash for files that would otherwise be unrecognized and skipped from the generated ZIP file, and it can be used to include files that are not read by the game in the generated pack, such as credits or license information. Please get in touch if you feel the urge to use this feature to compensate for PackSquash lacking proper support for asset files used by the game, though! Thank you @MinecraftAdmin for suggesting this improvement on issue #40.
Compression improvements
- PackSquash now only processes files whose path in the pack matches a hardcoded list of path patterns. Previously, any file that had a recognized extension, such as
.json, was optimized and included in the generated ZIP file, even if there was no way for Minecraft to read it. This improvement allows PackSquash to recognize different asset types much more precisely, enabling more specific and advanced optimizations. It also allowed the PackSquash codebase to be greatly refactored and simplified. However, this is a breaking change for users relying on PackSquash to optimize files that are not used by Minecraft: Java Edition, or only used by unsupported mods that do not follow the same asset location scheme as vanilla Minecraft. - Merged @sya-ri's PR #45, which ensures that Blockbench cube groups data is removed from JSON model files when debloating is enabled. Thank you very much for the PR!
- The JSON model debloat code now removes keys conventionally used by some autho
- v0.3.02021-08-22 · 2021-08-22 15:51 UTC
查看更新说明
These are the pre-built PackSquash executables for x64 Linux, macOS and Windows, and AArch64/ARM64 Linux.
For information about how to install and use PackSquash, please see the installation guide and the options files documentation.
Options files for v0.2.1 or v0.3.0-rc.1 are incompatible with v0.3.0.
Additions
- Text files used by Minecraft that contain the End Poem, credits and main screen splashes are now supported.
- Initial support for data packs was added, by handling .nbt and .mcfunction files. Currently, these data pack specific files are just copied to the generated ZIP file, but improved file-specific optimization techniques will be introduced in the future.
- JSON files (.json, .mcmeta and, if OptiFine is allowed, .jem and .jpm) can now contain Unix shell style line comments (
# line comment), C style block comments (/* block comment */), and C style line comments (// line comment). Comments are ignored and removed from the optimized JSON that is stored in the ZIP file. JSON with comments files (.jsonc) are now supported, and their extension is canonicalized to .json in the generated ZIP file, as Minecraft expects. - Pack file names can now at least contain every character in the Unicode Basic Multilingual Plane. This is a substantial improvement from the previous limitation of only ASCII characters.
- The
pack.mcmetafile is now validated for egregious errors by default, like missingpack_formatordescriptionkeys. This validation can be disabled if necessary. - An APT repository was created, to make it easier to install PackSquash and keep it updated on Debian-like Linux distros on the officially supported architectures. This is now the recommended method to install PackSquash on distros that can use this repository, like Debian and Ubuntu.
Compression improvements
- The PackSquash ZIP compressor was greatly revamped to allow for identical file deduplication and a greater range of ZIP specification conformance levels, so you can now choose the right balance between optimization and interoperability for your needs in a more precise way.
- Key-value pairs in JSON files that are known to be ignored by Minecraft, but usually present anyway, are now removed. This behavior can be disabled.
- The number of Zopfli compression iterations applied to pack files to store them in the generated ZIP file is now variable and configurable. This is useful to customize the desired tradeoff between compression and performance. The precise number of iterations done to a file depends on its size, with smaller files being compressed more, and larger files being compressed less, so performance is more predictable and consistent. As packs used with PackSquash tend to contain lots of small files but only a handful of big ones that are not already compressed, this new behavior can yield more space savings.
- PNG files can now be quantized to 2, 4 and 16 colors, in addition to the previously hardcoded, but still default, 256 colors.
- Improved shader minification. The exact savings depend on the input file, with bigger and more intrincate files being subject to more savings, but some test cases have shown a more than 10% optimized size decrease, compared to the previous shader minification technique.
- The generated ZIP files can now make use of ZIP64 extensions when needed to overcome certain limits of the original ZIP file format, like a maximum of 65535 files, or a total of less than 4 GiB of compressed data. Note that this ZIP64 support does not improve the per-file 4 GiB limit, because such big files do not make sense to use with Minecraft.
Performance improvements
- ZIP files that PackSquash has generated in previ
- v0.3.0-rc.12021-07-08 · 2021-07-08 21:55 UTC
查看更新说明
These are the pre-built PackSquash executables for x64 Linux, macOS and Windows, and AArch64/ARM64 Linux.
For information about how to install and use PackSquash, please see the installation guide and the options files documentation.
This is a release candidate version, not a final release. However, it is deemed to be extremely close to the final v0.3.0 release, and should be stable enough to use on your pack. The main reasons for this version to exist are that it helps giving other projects time to migrate, and allows fixing any showstopper bugs that may be reported by users. After some time has passed without known critical bugs, the final v0.3.0 version will be released.
Settings files for v0.2.1 are incompatible with v0.3.0.
Additions
- Initial support for data packs was added, by handling .nbt and .mcfunction files. Currently, these data pack specific files are just copied to the generated ZIP file, but improved file-specific optimization techniques will be introduced in the future.
- JSON files (.json, .mcmeta and, if OptiFine is allowed, .jem and .jpm) can now contain Unix shell style line comments (
# line comment), C style block comments (/* block comment */), and C style line comments (// line comment). Comments are ignored and removed from the generated ZIP file. JSON with comments files (.jsonc) are now supported, and their extension is canonicalized to .json in the generated ZIP file, as Minecraft expects. - Pack file names can now at least contain every character in the Unicode Basic Multilingual Plane. This is a substantial improvement from the previous limitation of only ASCII characters.
Compression improvements
- The PackSquash ZIP compressor was greatly revamped to allow for identical file deduplication and a greater range of ZIP specification conformance levels, so you can now choose the right balance between optimization and interoperability for your needs in a more precise way.
- Key-value pairs in JSON files that are known to be ignored by Minecraft, but usually present anyway, are now removed. This behavior can be disabled.
- The number of Zopfli compression iterations applied to pack files to store them in the generated ZIP file is now variable and configurable. This is useful to customize the desired tradeoff between compression and performance. The precise number of iterations done to a file depends on its size, with smaller files being compressed more, and larger files being compressed less, so performance is more predictable and consistent. As packs used with PackSquash tend to contain lots of small files but only a handful of big ones that are not already compressed, this new behavior can yield more space savings.
- PNG files can now be quantized to 2, 4 and 16 colors, in addition to the previously hardcoded, but still default, 256 colors.
- The generated ZIP files can now make use of ZIP64 extensions when needed to overcome certain limits of the original ZIP file format, like a maximum of 65535 files, or a total of less than 4 GiB of compressed data. Note that this ZIP64 support does not improve the per-file 4 GiB limit, because such big files do not make sense to use with Minecraft.
Performance improvements
- ZIP files that PackSquash has generated in previous runs can now be automatically used to vastly speed up next runs, as unchanged files can just be copied from that ZIP file instead of being processed again. PackSquash relies on the file modification timestamps provided by the filesystem to quickly deduce if a file may have been changed.
- Gigantic textures (> 4096x4096) are now rejected by default, because they usually make little sense to use with Minecraft, unless they are
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
PackSquash is a Minecraft: Java Edition resource and data pack optimizer which aims to achieve the best possible compression, performance, and protection, improving pack distribution, storage, and in-game load times.
Anecdotal evidence shows that, with the default options, version v0.2.1 was capable of reducing the size of the Witchcraft & Wizardary resource pack ZIP file by Floo Network (version 1.6.2) from 118 MiB to 57 MiB, a 51.69% size reduction, and it got better over time.
🔎 Overview
PackSquash walks through the pack files that it recognizes in a directory, applies per-file configurable lossy and lossless compression techniques, and builds a ZIP file that can be directly used by the game. Currently, PackSquash can apply the following specific techniques:
- For PNG images: color quantization to generate a color palette, lossless bit
depth, compression and color type reduction, metadata removal, and downsizing
of single-color textures. The quantization, although it is pretty subtle or
even unneeded for common texture sizes, can be disabled if lossless quality is
desired. Downsizing can also be turned off. Some of these optimizations are
done by the well-known
imagequant(used inpngquant) andoxipnglibraries. - For Ogg (.ogg and .oga), MP3, M4A, FLAC, and WAV files: channel mixing, downsampling, transcoding with a state-of-the-art Vorbis encoder, pitch shifting, tag removal, silence truncation, and two-pass optimization and validation with OptiVorbis. The default settings are meant to be good enough for in-game music, such that most listeners will think that the quality is good and not distracting. Because channel mixing may change how the Minecraft sound engine computes positional effects (see MC-146721), PackSquash won't do it by default.
- For JSON files (.json, .jsonc, .mcmeta and .mcmetac; if OptiFine mod support is enabled, also .jem, .jemc, .jpm and .jpmc): minification, by removing unneeded whitespace. As a side bonus, because minification requires parsing first, PackSquash also acts as a strict JSON file validator. Comments are the only syntax extension accepted, and they are discarded by default, although they can be rejected too in files whose extension does not end with a "c" letter. The validation done doesn't catch all the possible errors that might confuse Minecraft.
- For shader files (.vsh, .fsh and .glsl): minification, by removing unneeded whitespace, and resolution and expansion of preprocessor directives. As with JSON files, PackSquash will perform basic validation on them. Please note that due to limitations in the current design of PackSquash some shaders may require tweaking. These limitations will be addressed in the future.
- For structure files (.nbt): recompression with Zopfli, Gzip member concatenation, and metadata removal.
- For legacy language files (.lang; used in Minecraft 1.12.2 and lower): minification, removing blank lines and comments. Duplicate keys and non-blank lines that are not comments and do not contain a key-value separator are treated as errors, which helps catch mistakes and keep your files tidy.
- For OptiFine properties files (Java .properties; only if OptiFine mod support is enabled): minification, by removing unneeded whitespace. As with JSON files, performing minification requires parsing the file, so PackSquash will show basic validation errors.
- For BlockBench model files (.bbmodel; only if Minecraft Transit Railway 3 support is enabled): minification, by removing unneeded whitespace and keys. The minification might also improve privacy, as some keys containing environment-specific metadata are removed.
In addition to these techniques, the files that are not already compressed by design (namely, Ogg and PNG files) are losslessly compressed using the Zopfli algorithm, which is a state-of-the-art DEFLATE encoder made by Google. It is tuned for very high space savings at the cost of performance whilst being compatible with every DEFLATE decoder. For even higher savings, it is possible to compress already compressed files and increase the number of compression iterations, although this slows down the process significantly. Conversely, if lower savings are acceptable in exchange for faster execution, it is possible to reduce the number of compression iterations or skip it altogether.
PackSquash is also capable of doing the following things, although they are disabled by default because they require informed decisions to be made by the user:
- Reusing the ZIP files it previously generated to skip compressing files that did not change between executions, vastly speeding it up for incremental workflows, where only a few files change each time.
- Deduplicating identical files within the generated ZIP file: the contents of files repeated several times over will be stored only once.
- Protecting the generated ZIP files, making them harder to read by most ZIP manipulation programs, and some of the files stored inside such ZIP files.
🔗 Download and usage
PackSquash is a command-line application distributed for a bunch of operating systems and environments. Check out the getting started guide for details on how to begin your journey with PackSquash.
Alternatively, you might be interested in third-party tools that integrate with PackSquash, such as:
- Nexo, a Minecraft server plugin for creating custom items, blocks, armor, and more.
- Git Pack Manager, a Minecraft server mod/plugin for managing the server's resource pack using git.
✉️ Contact and support
As the license says, this software is provided without any warranty, with the hope that you find it useful. But that doesn't mean I don't welcome constructive feedback, suggestions, congratulations, or assisting you on your use of PackSquash (if I can and want to). If you wish to drop me a line for whatever reason related to PackSquash, you can contact me on Discord: alextmjugador.
You can also join the Discord server of our community, Comunidad Aylas, which has dedicated spaces to welcome English-language PackSquash chat and support, among other topics. Don't forget to introduce yourself!
🎁 Sponsoring
You can use all of PackSquash for free for whatever you want and will always be able to. One of the things I enjoy the most about making free software is the feeling that I'm doing something good and useful for others. With that said, PackSquash is arguably innovative, and some things were only possible to implement thanks to original knowledge of Minecraft internals acquired via static analysis of its deobfuscated code, which is an activity that is commonly referred to as reverse engineering. This is time-consuming, and engineers in companies get paid for doing these kinds of things. If you want to say "thank you" in a way that words can't describe or motivate me to stay committed to the project and advance in the roadmap, sending me some money would be a great way to do so!
In principle, I will use any funds I receive for personal spending. However, I may decide to introduce sponsor tiers and perks (retroactively, benefiting those who sponsored the project before they got introduced too), add more payment methods, share the funds with other high-profile contributors, or use them for donations and campaigns. I will be transparent about any major decisions I make about this, communicating them in public announcements.
✨ Contributors
Thanks goes to these wonderful people and projects (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome! If you are interested, you can check out the contributing guidelines to get started.