Micro-Optimizing .tar.gz Archives by Changing File Order
https://justinblank.com/experiments/optimizingtar.html [justinblank.com]
2021-01-20 06:50
A few weeks ago, I was doing something with a sizeable .tar.gz file, and wondered how the order of files affected the process. I’m not that knowledgable about compression, but I know that gzip uses a sliding window in which it looks for opportunities to compress repeating chunks of text. If you give it highly repetitive text, it does well, if you give it random data, it will probably give you a bigger file than when you started. So reordering files seems like it could matter.
source: danluu