
Hi All,
On Mon, Dec 6, 2010 at 7:06 PM, Mike Frysinger vapier@gentoo.org wrote:
On Monday, December 06, 2010 12:58:37 Peter Tyser wrote:
On Sun, 2010-12-05 at 16:16 +0100, Luigi 'Comio' Mantellini wrote:
XZ (aka LZMA2) is the new version of lzma compression format. The following patch add a cut-down version of XZ Embedded library (v20100702) that supports only single-call API.
In order to enable XZ support, the CONFIG_XZ must be defined by board configuration file.
For any details, please refer to XZ Embedded homesite (http://tukaani.org/xz/embedded.html)
If I understand the xz format correctly, its nearly identical to lzma, and the 'xz' utility can decompress .lzma files too. Any chance the xz code you're adding can be used to handle lzma-compressed archives? If so, can we deprecate CONFIG_LZMA and have the new CONFIG_XZ support handle both .xz and .lzma archives? Or at least share a significant chunk of code between the two formats?
my understanding is that the compression algorithm is the same, but the ".xz" file format adds nice/detectable header of metadata where as ".lzma" does not.
XZ is essentially a sequence of filters. LZMA2 is just a filter (a function that translate) and is made on top of LZMA algorithm. Furthermore the XZ file is not a LZMA file but the XZ header permits to distinguish a raw LZMA stream from a complex XZ. This is the "file format" point of view. Regarding the performance, the XZ, using a LZMA algorithm to compress the blocks, has performance very close the raw LZMA. Regarding the XZ tools point of view, a compatibility are provided by xz-tools in order to permit an easy transition to xz.
http://tukaani.org/xz/xz-file-format-1.0.4.txt
so yes, i believe the two should have quite a lot of [undesirable] overlap. -mike
The LZMA and XZ overlap on the internal LZMA code (each one has the own implementation). We can decide 1) to ignore this patch (and future rework) to not support XZ 2) have both XZ and LZMA considering them as different algorithms 3) Deprecate LZMA and (in the future) support just XZ.
My idea is to have 2) and in the future switch to 3).
should be interesting to check XZ library in order to use just the internal LZMA decoder to drop the lzma lib.
my 2Eurocents,
luigi
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot