Note: To follow the way that was recommended in some other post, I decided to also do only one post about Precomp instead of one per version, so both development news and future releases will go here.
Here's a first development version of Precomp 0.4.8 that integrates brunsli JPG compression. There might be some minor changes in the final version, but the main work is done. By default, brunsli is enabled and brotli compression of metadata is disabled - to enable the subsequent compressors (like lzma2) to compress the metadata. This gives much faster JPG compression and decompression with almost the same ratio as packJPG.
There are new command line switches to control the behaviour (found in the -longhelp). "brunsli[+-]" (default is on) enables/disables brunsli, "brotli[+-]" (default is off) enables/disables brotli and "packjpg[+-]" (default is on) can be used to disable the packJPG fallback.
Known limitations
- brunsli uses a pessimistic memory estimate, so it's quite memory hungry, that's why Stephan Busch's test images from https://github.com/google/brunsli/issues/16 will still fallback to packJPG. Tried to raise the kBrunsliMaxNumBlocks variable to test it - for the nasa jpg, precomp tried to allocate 10 GB RAM (have 4 GB here) and crashed. However, it's not that bad for everyday JPGs below 100 MB, e.g. the 60 MB test image below uses 800 MB memory using packJPG and 1300 MB using brunsli.
- no multithreading support (yet). There are some first experiments in brunsli to use "groups" compression that enables multithreading, but I couldn't get it compiled. But I'll give it another shot and also try to enable multithreading in reconstruction (-r) for JPG and MP3.
- no automatic recursion. Metadata compression with brotli is deactivated by default, so thumbnails in the metadata could be compressed with recursion. But doing this automatically would introduce some performance penalty and results aren't always better (thumbnails are usually very small). So at the moment, you'll have to call precomp twice for thumnail compression.
The attached version is a Windows 64-bit MSVC compile, if you want to compile your own version, you can use the "brunsli_integration" branch on GitHub. Please test it on your files and report any bugs.
Loch Lubnaig test image from Wikimedia Commons
Code:Original: 62.069.950 Bytes Precomp 0.4.7 -cn: 48.626.609, 2 min 14 s, -r: 2 min 18 s Precomp 0.4.7: 48.629.092, 2 min 55 s, -r: 2 min 18 s Precomp 0.4.8dev -cn: 49.822.256, 25 s, -r: 22 s Precomp 0.4.8dev -cn -brotli+: 49.787.761, 26 s, -r: 22 s Precomp 0.4.8dev: 49.790.048, 1 min 9 s, -r: 23 s