1

I have 4 apps that I'm trying to compress as much as possible and I discovered that I can get a much better compression just by manually moving the files that are common for all 4 projects into a fifth folder. The files are identical (I used Beyond Compare 4 to find them)

basket-api = 116 MB catalog-api = 133 MB identity-api = 127 MB ordering-api = 120 MB

enter image description here

When I use 7-zip to compress these folders I get a .7z file which is 150 MB. Which is pretty good.

Then I tried to split the common files in to a separate folder as I explained

enter image description here

I could easily recreate the original folders just by copying the files from common into all of the other stripped folders.

But this time when I run 7-zip the .7z file is only 52MB!

What's going on? How can this simple manual trick make the compression so much better?

Q-bertsuit
  • 3,223
  • 6
  • 30
  • 55
  • If you count the number of files _before_ and _after_ the re-organisation, do you get the same number of files? Is it possible that something like this is true `before=100, after=50`, because the shared files are only stored once? – oleksii Oct 18 '22 at 22:06
  • After the re-organization there are a lot fewer files in total. Since the apps share many identical files, these have been moved to the common folder. 1860 files before and 956 files after. But again, only identical files have been moved – Q-bertsuit Oct 19 '22 at 06:52
  • 1
    Feels like this may help https://stackoverflow.com/q/27457326/706456 – oleksii Oct 19 '22 at 21:51
  • Using the suggested kind of compression solved the mystery. Thank you! – Q-bertsuit Oct 21 '22 at 11:18
  • use zpaq for better compression even without reorganisating – TTho Einthausend Oct 30 '22 at 08:00

0 Answers0