Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: xz/doc/faq.txt

Issue 2869016: Add an unpatched version of xz, XZ Utils, to /trunk/deps/third_party (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « xz/debug/sync_flush.c ('k') | xz/doc/history.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1
2 XZ Utils FAQ
3 ============
4
5 Q: What do the letters XZ mean?
6
7 A: Nothing. They are just two letters, which come from the file format
8 suffix .xz. The .xz suffix was selected, because it seemed to be
9 pretty much unused. It is no deeper meaning.
10
11
12 Q: What are LZMA and LZMA2?
13
14 A: LZMA stands for Lempel-Ziv-Markov chain-Algorithm. It is the name
15 of the compression algorithm designed by Igor Pavlov for 7-Zip.
16 LZMA is based on LZ77 and range encoding.
17
18 LZMA2 is an updated version of the original LZMA to fix a couple of
19 practical issues. In context of XZ Utils, LZMA is called LZMA1 to
20 emphasize that LZMA is not the same thing as LZMA2. LZMA2 is the
21 primary compression algorithm in the .xz file format.
22
23
24 Q: There are many LZMA related projects. How does XZ Utils relate to them?
25
26 A: 7-Zip and LZMA SDK are the original projects. LZMA SDK is roughly
27 a subset of the 7-Zip source tree.
28
29 p7zip is 7-Zip's command line tools ported to POSIX-like systems.
30
31 LZMA Utils provide a gzip-like lzma tool for POSIX-like systems.
32 LZMA Utils are based on LZMA SDK. XZ Utils are the successor to
33 LZMA Utils.
34
35 There are several other projects using LZMA. Most are more or less
36 based on LZMA SDK.
37
38
39 Q: Do XZ Utils support the .7z format?
40
41 A: No. Use 7-Zip (Windows) or p7zip (POSIX-like systems) to handle .7z
42 files.
43
44
45 Q: I have many .tar.7z files. Can I convert them to .tar.xz without
46 spending hours recompressing the data?
47
48 A: In the "extra" directory, there is a script named 7z2lzma.bash which
49 is able to convert some .7z files to the .lzma format (not .xz). It
50 needs the 7za (or 7z) command from p7zip. The script may silently
51 produce corrupt output if certain assumptions are not met, so
52 decompress the resulting .lzma file and compare it against the
53 original before deleting the original file!
54
55
56 Q: I have many .lzma files. Can I quickly convert them to the .xz format?
57
58 A: For now, no. Since XZ Utils supports the .lzma format, it's usually
59 not too bad to keep the old files in the old format. If you want to
60 do the conversion anyway, you need to decompress the .lzma files and
61 then recompress to the .xz format.
62
63 Technically, there is a way to make the conversion relatively fast
64 (roughly twice the time that normal decompression takes). Writing
65 such a tool would take quite a bit time though, and would probably
66 be useful to only a few people. If you really want such a conversion
67 tool, contact Lasse Collin and offer some money.
68
69
70 Q: I have installed xz, but my tar doesn't recognize .tar.xz files.
71 How can I extract .tar.xz files?
72
73 A: xz -dc foo.tar.xz | tar xf -
74
75
76 Q: Can I recover parts of a broken .xz file (e.g. corrupted CD-R)?
77
78 A: It may be possible if the file consists of multiple blocks, which
79 typically is not the case if the file was created in single-threaded
80 mode. There is no recovery program yet.
81
82
83 Q: Is (some part of) XZ Utils patented?
84
85 A: Lasse Collin is not aware of any patents that could affect XZ Utils.
86 However, due to nature of software patents, it's not possible to
87 guarantee that XZ Utils isn't affected by any third party patent(s).
88
89
90 Q: Where can I find documentation about the file format and algorithms?
91
92 A: The .xz format is documented in xz-file-format.txt. It is a container
93 format only, and doesn't include descriptions of any non-trivial
94 filters.
95
96 Documenting LZMA and LZMA2 is planned, but for now, there is no other
97 documentation that the source code. Before you begin, you should know
98 the basics of LZ77 and range coding algorithms. LZMA is based on LZ77,
99 but LZMA is *a lot* more complex. Range coding is used to compress
100 the final bitstream like Huffman coding is used in Deflate.
101
102
103 Q: I cannot find BCJ and BCJ2 filters. Don't they exist in liblzma?
104
105 A: BCJ filter is called "x86" in liblzma. BCJ2 is not included,
106 because it requires using more than one encoded output stream.
107
108
109 Q: How do I build a program that needs liblzmadec (lzmadec.h)?
110
111 A: liblzmadec is part of LZMA Utils. XZ Utils has liblzma, but no
112 liblzmadec. The code using liblzmadec should be ported to use
113 liblzma instead. If you cannot or don't want to do that, download
114 LZMA Utils from <http://tukaani.org/lzma/>.
115
116
117 Q: The default build of liblzma is too big. How can I make it smaller?
118
119 A: Give --enable-small to the configure script. Use also appropriate
120 --enable or --disable options to include only those filter encoders
121 and decoders and integrity checks that you actually need. Use
122 CFLAGS=-Os (with GCC) or equivalent to tell your compiler to optimize
123 for size. See INSTALL for information about configure options.
124
125 If the result is still too big, take a look at XZ Embedded. It is
126 a separate project, which provides a limited but significantly
127 smaller XZ decoder implementation than XZ Utils.
128
OLDNEW
« no previous file with comments | « xz/debug/sync_flush.c ('k') | xz/doc/history.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698