user141302
user141302

Reputation:

what is the difference between tar and gZ?

when i compress the file "file.tar.gZ" in iphone SDK, it gives file.tar , but both tar and tar.gZ gives same size?any help please?

Upvotes: 1

Views: 1406

Answers (2)

Rhapsody
Rhapsody

Reputation: 6077

*.tar means that multiple files are combined to one. (Tape Archive)

*.gz means that the files are compressed as well. (GZip compression)

Edit: that the size is the same doesn't say a lot. Sometimes files can't be compressed.

Upvotes: 12

Justin Ethier
Justin Ethier

Reputation: 134177

As Rhapsody said, tar is an archive containing multiple files, and gz is a file that is compressed using gzip. The reason why two formats are used is because gzip only supports compressing one file - perhaps due to the UNIX philosophy that a program should do one thing, and do it well.

In any case, if you have the option you may want to use bzip2 compression, which is more efficient (IE, compresses files to a smaller size) than gzip.

Upvotes: 4

Related Questions