2

I am creating a zip archive of one file, in 3 different ways:

  • zip -1 (least compression) --> 33.8kB
  • zip -9 (most compression) --> 32.3kB
  • archive manager (zip option) --> 26.1kB

Why is there such a big difference?

Related: I'm trying to automatically zip files in Python using the zipfile module, and its performance is comparable to that of zip, but I want its performance to be that of archive manager. However, I can find no documentation on what archive manager does exactly. It claims to use 'zip' but clearly the compression is better...

  • 2
    Is it an option for you to use another compression tool/method, for example xz, which usually provides better compression than zip? – sudodus May 9 '18 at 13:33
  • 3
    You may check actual file type with file archive.zip. You can try to open archive with file-roller archive.zip and see its Properties (Type and Compression ratio). – N0rbert May 9 '18 at 15:01
  • 1
    @N0rbert it stated that p7zip compression was used. Strangely enough if I try to select .7z in file-roller, the file gets even smaller, and the properties (as in: which algorithm was used with which parameters) are identical! – PDiracDelta May 12 '18 at 18:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.