KTX Tools Reference 4.4.0
Libraries and tools to create and read KTX image texture files.
Loading...
Searching...
No Matches
ktx deflate

Deflate (supercompress) a KTX2 file.

SYNOPSIS

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

DESCRIPTION

ktx deflate deflates (supercompresses) the KTX file specified as the input-file and saves it as the output-file. If the input-file is '-' the file will be read from the stdin. If the output-path is '-' the output file will be written to the stdout. If the input file is already supercompressed it will be inflated then supercompressed again using the options specified here and a warning will be issued. If the input file is invalid the first encountered validation error is displayed to the stderr and the command exits with the relevant non-zero status code.

ktx deflate cannot be applied to KTX files that have been supercompressed with BasisLZ.

OPTIONS

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 faster but worse compression. Values above 20 should be used with caution as 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.
-q, –quiet
Silence warning about already supercompressed input fiile.
-e, –warnings-as-errors
Treat warnings as errors.
-h, --help
Print this usage message and exit.
-v, --version
Print the version number of this program and exit.

EXIT STATUS

  • 0 - Success
  • 1 - Command line error
  • 2 - IO failure
  • 3 - Invalid input file
  • 4 - Runtime or library error
  • 5 - Not supported state or operation
  • 6 - Requested feature is not yet implemented

HISTORY

Version 4.0
  • Initial version

AUTHOR

  • Mark Callow [@MarkCallow]