LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   size of zip file increased ! (https://www.linuxquestions.org/questions/linux-newbie-8/size-of-zip-file-increased-427247/)

tofee 03-22-2006 06:25 AM

size of zip file increased !
 
Hi ,

I made a zip file . but the size of the zipfile gets more than the original file. original file-size was 206 kb whereas after making zip, the size is now 1076 kb . what is the reason ?

how the file size is geting increased after zip , where it was supposed to less ?

michaelk 03-22-2006 06:54 AM

What type of files are you compressing? Binary or text?
In general binary files are not too compressible and so the zip file might be bigger then the source due to the compressing process.

tofee 03-22-2006 06:58 AM

i am trying to compress a txt file. not binary file.

Agrouf 03-22-2006 07:00 AM

Let say I want to compress this :
11111999222222 (14 caracters long)
I will use this algorithm : each number x is repeated y times. I will represent a sequence of numbers as yx.
It gives :
513962 (6 caracters long)
(5 times 1, 3 times 9 and 6 times 2).
I have compressed the string from 14 caracters to 6 (less than 50%).

Now let say I want to compress this string with the same algorithm :
513962 (6 caracters long)
it gives :
151113191612 (12 caracters long).
The same algorithms didn't compress but expanded the string in this case.

the zip algorithm compresses more or less most of the time but in some cases, it doesn't work (like for instance if you compress a zip file, you actually increase its size).

marozsas 03-22-2006 07:36 AM

Give us the command line you are using to create such zip file.

Poetics 03-22-2006 05:17 PM

And make sure the new file is not 1076 bytes and you just happened to misread it (happens to us all).

Then again, that's quite a hefty compression. What happens if you try to make it a tar.gz?


All times are GMT -5. The time now is 07:19 PM.