losslessly compresses the media in a mod, modpack, game, or texture pack, shrinking files in place:

filestoolwhat changes
*.pngoxipngre-encodes the image data and strips metadata chunks that don’t affect how it’s displayed (text, timestamps, etc.). pixels are unchanged
*.oggOptiVorbisre-packs the Vorbis stream. the decoded audio is unchanged

extensions are matched regardless of case. a file is only modified when the result is smaller

flint compress
flint compress --path path/to/mod
flint compress --check
optionpurpose
--checkdon’t write anything, list the files that could be compressed and fail if there are any. useful in CI

configured by [compress] in flint.toml:

keydefaultpurpose
level2oxipng optimization level from 0 to 6. higher is smaller but slower. doesn’t affect .ogg files

files are found the same way as the other commands (see config): only those matching [files] includes are compressed, hidden files and directories are skipped, and .gitignore is respected unless disabled in [vcs]. e.g. includes = ["**", "!textures/vendor/**"] leaves vendored textures alone.

files that have issues (i.e. corrupted) are left untouched and reported back.