lzma compression/decompression in bsdtar/libarchive?

Tim Kientzle kientzle at freebsd.org
Wed Nov 26 12:03:24 PST 2008


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


More information about the freebsd-hackers mailing list