Thread: Tar format
View Single Post
Old 15-12-2019, 11:59
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
Join Date: Nov 2000
Location: Hungary
Posts: 9,719
Thanks: 10
Thanked 299 Times in 190 Posts
Joe Forster/STA is on a distinguished road
tar (as in Tape ARchiver) does not compress files, it only packs them together with some headers. gzip, xz, bzip2 etc., on the other hand, compress files but only one at a time. That's why Unix stuff is archived with 1) files packed together with tar and then 2) the tar compressed with gzip etc. - hence the .tar.gz etc. double file extension - which is very similar to so-called "solid" archives: the multiple files are compressed as a single stream which gives you a better compression ratio but you can't extract a file without decompressing all the files before it. ZIP, RAR, 7-Zip etc. are archivers that do both these functions: pack files together and compress them.

But all these compressors are generic ones so you can't achieve the compression ratio of the special archivers you mentioned. There's only one common point: xz uses the LZMA compression method. (So does 7-Zip by default.) gzip uses LZ77 and Huffman, bzip2 uses RLE, Burrows–Wheeler Transform and Huffman; these are older compression methods, faster but less efficient.
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage:, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote