Is use_7z worth it? (was: Re: [57743] trunk/dports/graphics/ImageMagick/Portfile)

Anders F Björklund afb at macports.org
Tue Sep 15 23:53:57 PDT 2009


Ryan Schmidt wrote:

>> 	Is using 7z for downloads really worth the extra compile, etc.
>> time for the decompressor required, and the (presumably) longer
>> decompression time?
>
> IMHO, definitely, which is why the use_7z option was added to  
> MacPorts base. Processors in today's computers are extremely fast,  
> so the decompression time is practically nothing. All ports should  
> switch to 7z or similar highly-compressed alternatives to gz and  
> bz2 if available. lzma and xz are good choices too, though MacPorts  
> doesn't yet have a use_xz option. The lzma, xz and 7z formats can  
> all use the lzma compression algorithm.

Using .7z isn't a good option in the same way that using .zip isn't  
optimal. If you want the LZMA compression, it would be better to  
use .tar.lzma instead ? Even better is to use LZMA2 in form  
of .tar.xz, when that has been added/released*.

* XZ Utils is still in beta (thus port "xz-devel"), see http:// 
tukaani.org/xz/

> The p7zip 9.04 bz2 distfile is 3.6 MB. This plus the size of the  
> ImageMagick 6.5.6-1 7z distfile (5.7 MB) is only slightly larger  
> than the size of the ImageMagick 6.5.6-1 bz2 distfile (8.6 MB). So  
> if the user did not already have p7zip, then it will take a little  
> longer this one time, but for every subsequent update, it's a win.

Using xz instead of bz2 is a good alternative, since it makes smaller  
files and is faster to decompress (it takes longer to compress, but  
that's server-side/once).  It does *not* replace gz however, as there  
are lots of cases where gzip is "good enough" (and faster).

But I don't think you should use the .7z format, use compressed .tar  
instead.

--anders



More information about the macports-dev mailing list