From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 26 20:03:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E90D71065689 for ; Wed, 26 Nov 2008 20:03:23 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id B9CDD8FC35 for ; Wed, 26 Nov 2008 20:03:23 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mAQK3Ntv070370; Wed, 26 Nov 2008 12:03:23 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <492DAB86.8030500@freebsd.org> Date: Wed, 26 Nov 2008 12:03:18 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ivan Voras References: <259774.68895.qm@web39105.mail.mud.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: lzma compression/decompression in bsdtar/libarchive? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 20:03:24 -0000 Ivan Voras wrote: > bf wrote: >> >>There is good news: Igor Pavlov, the primary author of the original LZMA >>SDK, has placed the latest version, available at: >> >>http://downloads.sourceforge.net/sevenzip/lzma461.tar.bz2 >> >>into the public domain. It's a mix of ANSI-C and C++ code, and so it >>would seem suitable for adoption into the FreeBSD source tree ... > > How useful would LZMA be without supporting the .7z file format? > Probably not at all, since there isn't a gzip-like file format or > wrapper that supports LZMA. Plain .lzma streams are being used today with tar. GNU tar added support recently and read support will be a build option in the upcoming 2.6 release of the libarchive-portable distribution, though it can't be enabled in the FreeBSD base system without the corresponding LZMA libraries. (I expect to get libarchive-portable 2.6 integrated into FreeBSD-CURRENT by the end of the year.) As Joerg pointed out, plain lzma streams are tough to auto-detect, since they only have a 1-byte leading signature. I'm hoping to study the format and find better ways to automatically detect it. Lasse Collin has proposed a wrapper format for LZMA (similar to how gzip format wraps deflate streams) that looks promising, though it's still very new and not yet widely used. I think that's called "lzip". There's also something called "lzop", though I'm not yet sure what exactly that is. The .7z file format is well supported by the 7zip utility in ports, as you pointed out. I don't see any pressing need to support that within FreeBSD base system. Some people are using lzma compression within ZIP archives, and libarchive could easily be extended to support that. (But again, that couldn't be turned on in the FreeBSD base system without the LZMA libraries.) Tim