开发者

what is the difference between tar and gZ?

开发者 https://www.devze.com 2022-12-24 17:28 出处:网络
when i compress t开发者_JS百科he file \"file.tar.gZ\" in iphone SDK, it gives file.tar , but both tar and tar.gZ gives same size?any help please?*.tar means that multiple files are combined to one. (T

when i compress t开发者_JS百科he file "file.tar.gZ" in iphone SDK, it gives file.tar , but both tar and tar.gZ gives same size?any help please?


*.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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号