blob: 88699965b0d03cf364c0895feb7d23ca24fb875a [file] [log] [blame]
Lasse Collin36d0dfc2011-03-30 13:59:11 +03001
Lasse Collin1a5f92d2011-08-17 21:11:40 +03002XZ for Java
3===========
Lasse Collin36d0dfc2011-03-30 13:59:11 +03004
5Introduction
6
Lasse Collinc95e64a2011-07-28 10:32:50 +03007 This aims to be a complete implementation of XZ data compression
Lasse Collin1a5f92d2011-08-17 21:11:40 +03008 in pure Java. Features:
9 - Full support for the .xz file format specification version 1.0.4
10 - Single-threaded streamed compression and decompression
11 - Single-threaded decompression with limited random access support
12 - Raw streams (no .xz headers) for advanced users, including LZMA2
13 with preset dictionary
14
15 Threading is planned but it is unknown when it will be implemented.
Lasse Collinc95e64a2011-07-28 10:32:50 +030016
17 For the latest source code, see the project home page:
Lasse Collin36d0dfc2011-03-30 13:59:11 +030018
Lasse Collin8aa09962017-04-19 22:07:46 +030019 https://tukaani.org/xz/java.html
Lasse Collin36d0dfc2011-03-30 13:59:11 +030020
Lasse Collin01b8f652017-12-29 17:48:33 +020021 The source code is compatible with Java 5 and later.
Lasse Collin36d0dfc2011-03-30 13:59:11 +030022
23Building
24
Lasse Collinc95e64a2011-07-28 10:32:50 +030025 It is recommended to use Apache Ant. Type "ant" to compile the
26 classes and create the .jar files. Type "ant doc" to build the
27 javadoc HTML documentation. Note that building the documentation
28 will download a small file named "package-list" from Oracle to
29 enable linking to the documentation of the standard Java classes.
30
Lasse Collined4d5342018-01-02 22:01:30 +020031 If you are using OpenJDK 9 or later, you will need to edit the
32 "sourcever = 1.5" line in the file "build.properties" before
33 running "ant". Set it to 1.6 or higher. The default value 1.5
34 isn't supported by OpenJDK 9 or later.
35
Lasse Collinc95e64a2011-07-28 10:32:50 +030036 If you cannot or don't want to use Ant, just compile all .java
37 files under the "src" directory.
38
39Demo programs
40
41 You can test compression with XZEncDemo, which compresses from
42 standard input to standard output:
43
44 java -jar build/jar/XZEncDemo.jar < foo.txt > foo.txt.xz
Lasse Collin36d0dfc2011-03-30 13:59:11 +030045
46 You can test decompression with XZDecDemo, which decompresses to
47 standard output:
48
Lasse Collinc95e64a2011-07-28 10:32:50 +030049 java -jar build/jar/XZDecDemo.jar foo.txt.xz
Lasse Collin36d0dfc2011-03-30 13:59:11 +030050
51Reporting bugs
52
53 Report bugs to <lasse.collin@tukaani.org> or visit the IRC channel
54 #tukaani on Freenode and talk to Larhzu.
55