LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-22-2006, 06:25 AM   #1
tofee
Member
 
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, 06:54 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,734

Rep: Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752Reputation: 1752
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, 06:58 AM   #3
tofee
Member
 
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, 07:00 AM   #4
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
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, 07:36 AM   #5
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
Give us the command line you are using to create such zip file.
 
Old 03-22-2006, 05:17 PM   #6
Poetics
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?
 
  


Reply


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 10:54 AM
create a self-extracting zip file with zip on solaris? samsolaris Solaris / OpenSolaris 3 10-15-2004 01:50 AM
Wow, My Yahoo Mail account has increased in size jaz General 13 09-01-2004 07:28 AM
Ghostscript: why is pdf size sometimes increased so much? J_Szucs Linux - Software 2 08-27-2004 09:19 AM
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 04:18 PM


All times are GMT -5. The time now is 06:21 PM.

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