moria.org.uk

Thu, 24 Mar 2005

tar pit

I've been working with some people on the use of zsync for Gentoo mentioned previously, and we came across this oddity of tar. We were trying to work out why a given directory tree took 160MB as a .tar, but only 88MB when stored in a different format. It turns out that tar uses a block size of 512 bytes, so every file takes at least 512 bytes for the data, and 512 bytes for the metadata (filename etc). So half the tarball was empty space because... because the tar format was designed to go to 512-byte-block tapes. Given that most of tar's use is for distributing files online now, I don't want to know how much space is wasted just because the old format demanded it.

cpio seems to be more efficient - it doesn't use anything like as much padding. Somehow I don't think I will boost zsync's popularity if I advise people to use cpio :-). zip also seems to have very compact metadata.

[20:41] | [/computers/code] | #

Colin Phipps.
Archives
January 2007
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
Web Sites
zsync
PrBoom
About Kye
Credits
Blosxom
Powered by
Blogs that link here
[Valid Atom]