Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-22-2006, 07:25 AM   #1
Registered: Mar 2006
Posts: 41

Rep: Reputation: 15
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 ?
Old 03-22-2006, 07:54 AM   #2
Registered: Aug 2002
Posts: 19,552

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
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.
Old 03-22-2006, 07:58 AM   #3
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 15
i am trying to compress a txt file. not binary file.
Old 03-22-2006, 08:00 AM   #4
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
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).
Old 03-22-2006, 08:36 AM   #5
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,439
Blog Entries: 1

Rep: Reputation: 66
Give us the command line you are using to create such zip file.
Old 03-22-2006, 06:17 PM   #6
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
increased reiserfs partition size lobo78 Linux - General 1 06-18-2005 11:54 AM
create a self-extracting zip file with zip on solaris? samsolaris Solaris / OpenSolaris 3 10-15-2004 02:50 AM
Wow, My Yahoo Mail account has increased in size jaz General 13 09-01-2004 08:28 AM
Ghostscript: why is pdf size sometimes increased so much? J_Szucs Linux - Software 2 08-27-2004 10:19 AM
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 05:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration