@KodeZwerg thank you for the test results.
Can you tell me what the source file is? Is do not think it is the famous tiger.svg, but if you can share it, I can test it.
Small files are a field that Pack can shine in if there are not just one or two, as you detected, and as I stated previously. Pack's lowest size is 2KB. So if you want to compress, for example, a 4KB or even 1KB file, you cannot get a win in compression ratio. After all, Pack is a container, not a compressor.
If you send me the file, I can test it more, but here are my results for tiger.svg, 95.6KB:
tar.gz: 30.8KB
RAR: 30.2KB
Zip: 28.1KB
7z: 26.3KB
Pack: 34KB
You can see that for small files, there is no win in size, only speed. And that is by design; Pack does not go after that last drop of size; it tries to make a balance between size and speed in a meaningful way. And by meaningful, it means, everyday use, and not going hard on your hardware just to save a kilobyte. There are a lot of alternatives that can go to extreme lengths to get the last drop; my goal was the other way around, doing the task optimized and not competitive.
But I get you; sometimes you want more. For example, if you want to pack it once and send it many times over the wire, there is a Hard Press available. You can use `--press=hard` to tell Pack to try harder to compress your data. For example, for the previous tests, the output will be 30.5KB. And for the first Linux source test, it is 146MB instead of the normal 194MB.
And again, even with Hard Press, Pack does not try to eat your hardware just to get a little more; it goes the optimized way I described.
So let us do more, and go with PNG files, a format that is already compressed.
Lazarus images, 3K files, and around 3.88MB in Size, and 8.39MB Size on Disk.
tar.gz: 240ms, 3.45MB (3.46MB on disk)
Pack: 83ms, 3.52MB (3.52MB On disk)
You can see again that for a small loss of size (2%), Pack prepares the result 300% faster.
And to answer your question, no, no temp files.
I am enjoying your input, and I will use it to optimize Pack further. Thank you.