From: Evan Phoenix Date: 2010-05-23T01:41:05+09:00 Subject: [ruby-core:30368] Re: [Feature #1478] Ruby archive On May 22, 2010, at 3:58 AM, Benoit Daloze wrote: > Hi, > > On 22 May 2010 01:44, Caleb Clausen wrote: >> I'm not a big fan of .zip either, but give it its due. >> >> Zip has the advantage that you can 'seek' to arbitrary files within >> the archive without needing to decompress all the other files that >> come before it. That's not true of gzipped tar files..... >> >> Because each member of a zip file is a compressed separately. But this >> same design decision is why .tar.gz compresses better than .zip, given >> the same collection of files. >> > What about LZMA (p7zip, xz) ? I have looked into this in the past and could not find any open source libraries for reading 7z or xz files. That is the biggest reason not to use them, we don't want to start this project off writing a container format. - Evan > > From my experience it's far better in size than .zip and .tar.{gz,bz2}, > and it has the ability to get one file at a time. > > The downside, is, I suppose, the speed/computation for compressing/extracting. > > Let's see a little on Ruby's source (I could not get xz working on OSX): > (format, size, compression time, extraction time, relative size to > original, Mo compressed/s, Mo extracted/s) > fmt size ctime xtime psize Mc/s Mx/s > 7za 5476 14.7s 7.8s 13.01% 2.86 5.39 > bz2 6792 8.7s 3.6s 16.14% 4.84 11.69 > gz 8252 3.0s 4.0s 19.61% 14.03 10.52 > > I personally prefer a little slower compression/extraction with a low > size, as it make easier downloads. > > Regards, > B.D. > >