
Brotli-G SDK
Brotli-G is an open-source compression/decompression standard for digital assets (based on Brotli) that is compatible with GPU hardware.
Compressonator v4.5 is now available!
The new features included with this release are summarised below, but if you want to jump in and try it for yourself the Compressonator page contains all of the download and documentation links.
The newly released version 1.1 of the Brotli-G SDK has been integrated into Compressonator, and with it the ability to “precondition” most BCn format textures to improve compression. Using Compressonator CLI, users can get higher compression ratios than previous Compressonator versions without the need for any manual configuration. Simply select Brotli-G compression and the application will automatically detect if the input texture is supported for preconditioning in the Brotli-G SDK and enable it if possible.
From running the new Brotli-G compression with some sample textures, it managed to reduce the size of the compressed BRLG file by on average 10% - 15%, in some cases shrinking by as much as 20% compared to the previous Compressonator version.
This functionality is currently only supported for BC1-BC5 format textures, with work ongoing to expand it to BC6 and BC7 textures.
Additionally, three new command line options have been added to Compressonator CLI that control aspects of the preconditioning. The first and most straightforward is NoPreconditionBRLG which simply disables preconditioning of textures during Brotli-G compression. The other two, DoSwizzleBRLG and DoDeltaEncodeBRLG, enable extra block swizzling and colour delta encoding steps in the precondition stage that might further improve compression. More detailed information about the techniques used can be found in the Brotli-G SDK project.
Overall the improvement that can be found with enabling the DoSwizzleBRLG or DoDeltaEncode flags varies greatly depending on the input texture and output format. That being said, we have found that the DoDeltaEncodeBRLG flag works particularly well with BC4 and BC5 textures, potentially improving compression by around 5% compared to having the flag disabled.
A new option, PackageBRLG, was introduced in Compressonator CLI. When enabled, the option will allow users to package all files in a directory and its subdirectories into a single output ”.BRLG” file. Slight changes were made to the specifications of the BRLG file format to enable this new feature, but it is still completely backwards compatible with the previous format, so Compressonator CLI will have no issues reading or writing older versions of the BRLG files.
To use the new feature users will need to specify Brotli-G compression and pass a folder as input to the command line tool. The command should look something like:
compressonatorcli.exe -PackageBRLG -fd BRLG example_folder/ output_package.brlg
This will take every file in example_folder (and all its subfolders) and compress them together into a single output_package.brlg file. The resulting BRLG file can be decompressed just like any other BRLG file. The difference is that the decompression operation will unpackage every file and output them into the desired path, preserving the original subdirectory structure when they were originally packaged.
So, the command for decompression would look like:
compressonatorcli.exe output_package.brlg result_folder/
Important to note is that, as previously mentioned, directory structure is preserved within the packaging and unpacking processes. Which means that if the input folder has files like:
example_folder test.txt subfolder test.txt texture.dds
Then the output from decompression will look like:
result_folder test.txt subfolder test.txt texture.dds
The way Compressonator CLI handles input textures with existing mipmap levels has been improved. The -nomipmap
option has been updated to now always result in an output without any additional mipmap levels, and the -miplevels
option will properly control the maximum number of mipmap levels that are present in the output file regardless of how many mipmap levels are contained in the input file.
The inconsistent behaviour in ETC codecs compared to our other codecs has been fixed. Previously, the ETC codecs were erroneously swapping the red and blue channels in the output, which has been resolved in this release.
The latest release of Compressonator is available on GitHub.
Also, check out the Compressonator documentation to get started.