Showing results for 
Search instead for 
Did you mean: 

Compressed file is bigger


Compressed file is bigger


We are having 5.A PK6.

We are trying to compress a dbf file, but when we try to compress this 20MB file, it becomes 22MB.

I can understand the fact that if file can not be compressed, the output fill will be bigger owing to the fact that compress will add its bits/header during compression.

But How can one explain the 10% increase in the size of the file?

Can anybody who is aware of this explain this in details?

Thanks and Best Regards.

Mahesh R. Gune
Hein van den Heuvel
Honored Contributor

Re: Compressed file is bigger

Well, you don't give us too much information here, like which exact command you used for compress (I guess a simple compress, not zip).
More importantly, what commands did you use to check the size. Since the files are not too big, just try wc on them. The dbf file, notably if it was TEMP might have been a 'sparse' file where untouched blocks were not actually allocated.

man ls ....



[Tru64 UNIX] Sparse files, such as quota files, may not be using as much
on-disk storage as the ls -l command reports. Use the ls -s command to
obtain an accurate report of the on-disk storage used by a sparse file."

Ivan Ferreira
Honored Contributor

Re: Compressed file is bigger

Sometimes, compressed files can be larger than original files if the files cannot be compressed because they are alread in "compressed" format.

Why bigger, because the compress program adds information about what it did to compress o r try to compress the file.

Suppose a file that can be compressed, then the compress program will add the info "I have found the same information in the file ten 1000 times, and the location is for was ....".

When trying to do the compression, even if it cannot do nothing, will add information required to decompress the file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?