Created attachment 155537 [details] Values to prove the point WHAT: Request to add support for .kra files which are compressed with bzip2. Proof-in-point it's better: Bzip2 objectively supports higher compression rates than the deflate algorithm which would help reducing the size of .kra files for archival purposes. However, bzip2 is much slower than deflate. Most people wouldn't want to use it for saving while modifying the file. However, for archival, some people may not mind the extra time in exchange for better compression. Tests prove the higher compression (and also sources): https://archive.is/A5GsW https://tukaani.org/lzma/benchmarks.html (https://archive.is/HJgj) Values to prove the point: See the attachment (anti-spam block) What Krita needs to do (in concrete) to fulfill this ticket: Update quazip dependency to version 1.4. (https://github.com/stachenov/quazip/releases/tag/v1.4) Non-issues for this ticket: Support saving kra files as bzip2. That will be handled by a different ticket.
Hi! It's an interesting thing to do for sure. However, I believe the real problem is that the tests you showed do not apply to KRA; the biggest contribution is made by pixel layers, which are binary and of much higher entropy than a .txt. I'd be glad to see if other algorithms (Zstandard, LZMA2, gzip, etc.) are more suitable for this case; and having multithreaded compression would certainly help a lot, irrespective of whether we change the algorithm.
(In reply to amyspark from comment #1) > I'd be glad to see if other algorithms (Zstandard, LZMA2, gzip, etc.) are > more suitable for this case; and having multithreaded compression would > certainly help a lot, irrespective of whether we change the algorithm. The only alternative I can see would be changing libraries from quazip to, for example, minizip-ng. However, that would be much much more work. But the gain would be being able to use more effective compression algorithms such as Zstd you mention or LZMA. Given just changing quazip is a quick-win, backwards-compatible, just changing the version used and it provides marginally better compression, I think it should be worth as a quick-win. If you need actual tests with kra files, I can try finding open-source ones and test compression with (unless you can provide some data to test on)