ktx_deflate(1)

πŸ“¦ version 4.4.2, in nixos 26.05, nixpkgs unstable

πŸ’… ktx_deflate β€” the KTX Tools Reference, bestie edition ✨

okay so real talk, this is the manual for ktx_deflate, and it lives in the KTX Tools Reference family. Let me tell you everything about it, no cap 🫢

✨ NAME ✨

ktx_deflate β€” lowkey its whole personality is: deflate stuff.

Like, it deflates (a.k.a. supercompresses) a KTX2 file. That's the vibe. πŸŽ€

🌸 SYNOPSIS 🌸

ktx deflate [option...] input-file output-file

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜•: ktx deflate takes the KTX file you name as input-file and deflates it (supercompresses it, bestie, we're squeezing it down) and saves the result as output-file.

A few little details you literally cannot skip:

  • if input-file is -, the file gets read from stdin πŸ‘€
  • if output-path is -, the output gets written to stdout πŸ’«
  • if your input file is already supercompressed, it gets inflated first and then supercompressed again using the options you passed here β€” and you'll get a warning about it. not me being nosy, that's just what happens πŸ™ˆ
  • if the input file is invalid, the first validation error it runs into gets printed to stderr and the command exits with the relevant non-zero status code. so yeah, it will absolutely tell on you πŸ’€
⚠️ ngl this is important: ktx deflate cannot be applied to KTX files that have been supercompressed with BasisLZ. that's just not a thing it does. periodt.

πŸŽ€ OPTIONS πŸŽ€

here's the whole menu, the following options are available:

  • --zstd <level> β€” supercompress the data with Zstandard. cannot be used with ETC1S / BasisLZ format. level range is [1,22]. lower levels give you faster but worse compression. and values above 20? use those with caution because they require more memory 🧠πŸ”₯
  • --zlib <level> β€” supercompress the data with ZLIB. cannot be used with ETC1S / BasisLZ format. level range is [1,9]. lower levels give faster but worse compression, same deal as above πŸ’…
  • -q, --quiet β€” silences the warning about an already supercompressed input file. shhh 🀫
  • -e, --warnings-as-errors β€” treats warnings as errors. strict queen behavior πŸ‘‘
  • -h, --help β€” prints this usage message and exits. the classic escape hatch πŸšͺ
  • -v, --version β€” prints the version number of this program and exits. gotta know what you're working with ✨

⭐ EXIT STATUS ⭐

like, the number it leaves behind says everything about how it went:

  1. 0 β€” success πŸŽ‰ slay
  2. 1 β€” command line error 🫠
  3. 2 β€” IO failure 😭
  4. 3 β€” invalid input file πŸ’€
  5. 4 β€” runtime or library error πŸ™ˆ
  6. 5 β€” not supported state or operation 🚫
  7. 6 β€” requested feature is not yet implemented (soon tho, hopefully) 🧚

🌈 HISTORY 🌈

Version 4.0

  • initial version β€” everyone starts somewhere πŸŽ€

πŸ’œ AUTHOR πŸ’œ

  • Mark Callow [@MarkCallow] β€” the icon, the legend, the main character πŸ‘‘πŸ«Ά

and that's the whole page bestie!! 🌸 this absolute gem comes to you from Version 0.0.0, dated Tue Jan 1 1980 00:00:00 β€” yes, the most iconic timestamp of all time πŸ’– go forth and deflate responsibly, ily, bye πŸ‘‹βœ¨

πŸ“¦ where this page comes from