xz/doc/faq.txt

123 lines
4.7 KiB
Plaintext
Raw Normal View History

2007-12-08 22:42:33 +00:00
XZ Utils FAQ
============
2007-12-08 22:42:33 +00:00
Q: What do the letters XZ mean?
2007-12-08 22:42:33 +00:00
A: Nothing. They are just two letters, which come from the file format
suffix .xz. The .xz suffix was selected, because it seemed to be
pretty much unused. It is no deeper meaning.
2007-12-08 22:42:33 +00:00
Q: What are LZMA and LZMA2?
2007-12-08 22:42:33 +00:00
A: LZMA stands for Lempel-Ziv-Markov chain-Algorithm. It is the name
of the compression algorithm designed by Igor Pavlov for 7-Zip.
LZMA is based on LZ77 and range encoding.
2007-12-08 22:42:33 +00:00
LZMA2 is an updated version of the original LZMA to fix a couple of
practical issues. In context of XZ Utils, LZMA is called LZMA1 to
emphasize that LZMA is not the same thing as LZMA2. LZMA2 is the
primary compression algorithm in the .xz file format.
2007-12-08 22:42:33 +00:00
Q: There are many LZMA related projects. How does XZ Utils relate to them?
2007-12-08 22:42:33 +00:00
A: 7-Zip and LZMA SDK are the original projects. LZMA SDK is roughly
a subset of the 7-Zip source tree.
2007-12-08 22:42:33 +00:00
p7zip is 7-Zip's command line tools ported to POSIX-like systems.
2007-12-08 22:42:33 +00:00
LZMA Utils provide a gzip-like lzma tool for POSIX-like systems.
LZMA Utils are based on LZMA SDK. XZ Utils are the successor to
LZMA Utils.
2007-12-08 22:42:33 +00:00
There are several other projects using LZMA. Most are more or less
based on LZMA SDK.
2007-12-08 22:42:33 +00:00
Q: Do XZ Utils support the .7z format?
2007-12-08 22:42:33 +00:00
A: No. Use 7-Zip (Windows) or p7zip (POSIX-like systems) to handle .7z
files.
2007-12-08 22:42:33 +00:00
Q: I have many .tar.7z files. Can I convert them to .tar.xz without
spending hours recompressing the data?
2007-12-08 22:42:33 +00:00
A: In the "extra" directory, there is a script named 7z2lzma.bash which
is able to convert some .7z files to the .lzma format (not .xz). It
needs the 7za (or 7z) command from p7zip. The script may silently
produce corrupt output if certain assumptions are not met, so
decompress the resulting .lzma file and compare it against the
original before deleting the original file!
2007-12-08 22:42:33 +00:00
Q: I have many .lzma files. Can I quickly convert them to the .xz format?
2007-12-08 22:42:33 +00:00
A: For now, no. Since XZ Utils supports the .lzma format, it's usually
not too bad to keep the old files in the old format. If you want to
do the conversion anyway, you need to decompress the .lzma files and
then recompress to the .xz format.
2007-12-08 22:42:33 +00:00
Technically, there is a way to make the conversion relatively fast
(roughly twice the time that normal decompression takes). Writing
such a tool would take quite a bit time though, and would probably
be useful to only a few people. If you really want such a conversion
tool, contact Lasse Collin and offer some money.
2007-12-08 22:42:33 +00:00
Q: Can I recover parts of a broken .xz file (e.g. corrupted CD-R)?
2007-12-08 22:42:33 +00:00
A: It may be possible if the file consists of multiple blocks, which
typically is not the case if the file was created in single-threaded
mode. There is no recovery program yet.
2007-12-08 22:42:33 +00:00
Q: Is (some part of) XZ Utils patented?
2007-12-08 22:42:33 +00:00
A: Lasse Collin is not aware of any patents that could affect XZ Utils.
However, due to nature of software patents, it's not possible to
guarantee that XZ Utils isn't affected by any third party patent(s).
2007-12-08 22:42:33 +00:00
Q: Where can I find documentation about the file format and algorithms?
2007-12-08 22:42:33 +00:00
A: The .xz format is documented in xz-file-format.txt. It is a container
format only, and doesn't include descriptions of any non-trivial
filters.
2007-12-08 22:42:33 +00:00
Documenting LZMA and LZMA2 is planned, but for now, there is no other
documentation that the source code. Before you begin, you should know
the basics of LZ77 and range coding algorithms. LZMA is based on LZ77,
but LZMA is *a lot* more complex. Range coding is used to compress
the final bitstream like Huffman coding is used in Deflate.
2007-12-08 22:42:33 +00:00
Q: I cannot find BCJ and BCJ2 filters. Don't they exist in liblzma?
A: BCJ filter is called "x86" in liblzma. BCJ2 is not included,
because it requires using more than one encoded output stream.
Q: How do I build a program that needs liblzmadec (lzmadec.h)?
2007-12-08 22:42:33 +00:00
A: liblzmadec is part of LZMA Utils. XZ Utils has liblzma, but no
liblzmadec. The code using liblzmadec should be ported to use
liblzma instead. If you cannot or don't want to do that, download
LZMA Utils from <http://tukaani.org/lzma/>.
2007-12-08 22:42:33 +00:00
Q: The default build of liblzma is too big. How can I make it smaller?
2007-12-08 22:42:33 +00:00
A: Give --enable-small to the configure script. Use also appropriate
--enable or --disable options to include only those filter encoders
and decoders and integrity checks that you actually need. Use
CFLAGS=-Os (with GCC) or equivalent to tell your compiler to optimize
for size. See INSTALL for information about configure options.
2007-12-08 22:42:33 +00:00
If the result is still too big, take a look at XZ Embedded. It is
a separate project, which provides a limited but significantly
smaller XZ decoder implementation than XZ Utils.
2007-12-08 22:42:33 +00:00