Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compress does not save disk space ?

Status
Not open for further replies.

pissallio

IS-IT--Management
Oct 2, 2004
36
0
0
CN

I have make all the files in the directory into a .tar file using
#tar -cvf bak.tar *
a 12.jpg 578 blocks.
a 123.jpg 193 blocks.
a 1234.jpg 220 blocks.
a 41324.jpg 230 blocks.
a bgfag.jpg 92 blocks.
a fadf_005.jpg 747 blocks.
a fadsf.jpg 293 blocks.
Then i tried to use "compress bak.tar" to compress the .tar file
But the tar command supply the following info to me:
This file is not changed; compression does not save space.
After i use "compress -f bak.tar" to force the compression of the .tar file,the result was that the size of "bak.tar.Z" larger than bak.tar.

Why would this weird problem occur?
 
Because the compression wouldn't result in a space saving - as you have demonstrated. Possibly something to do with the .jpg files? As a matter of interest, can you compress the individual files?
 
try gzip instead

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant.
 
For the individual file, the same error appears
 
jpg files are already compressed, compressing again is unlikely to make any difference.
 
After i compress the .tar file with gzip, it does work.
 
After i compress the .tar file with gzip, it does work.
Maybe the arithmetic logic used by "gzip" was better than "compress
 
Hey guys!

Pppllleeease think!!!

Jpeg images are heavily compressed, using algorithms that fits well for image data. Why do you think that you can shrink them and gain many space using general purpose compression utility?

--Trifo
 
Because, demonstrably, gzip does it! I guess the question is, are the gunzipped jpeg images OK.
 
Hi,KenCunningham
gunzip also works fine which i have already tried.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top