Search code examples
shellunixzipcompressionaix

unix command 'zip' or 'compress' - file size is bigger than before


I want to know unix shell command make this happen.
when I use unix command zip or compress it makes file size bigger than before.
For example,
a.tar

$compress -f a.tar
> a.tar.Z

a.tar file size is 1131746050
a.tat.Z file size is 1516269444

it was same in i use zip command.

i know compress command didn't work when file was bigger than before so I used -f option. My question is why it was bigger? I want to know reason about zip or compress command make more big file...


Solution

  • It may have already been compressed, or may just be a file that cannot be compressed any further. You can’t compress a file infinitely, or you’d just lose all the data. So if you try to compress them again, all it’s doing is adding compression data, and so the file actually gets larger.