# Package org.tukaani.xz

XZ data compression support.

#### Introduction

This aims to be a complete implementation of XZ data compression in pure Java. Features:

- Full support for the .xz file format specification version 1.0.4
- Single-threaded streamed compression and decompression
- Single-threaded decompression with limited random access support
- Raw streams (no .xz headers) for advanced users, including LZMA2 with preset dictionary

Threading is planned but it is unknown when it will be implemented.

For the latest source code, see the home page of XZ for Java.

#### Getting started

Start by reading the documentation of `XZOutputStream` and `XZInputStream`. If you use XZ inside another file format or protocol, see also `SingleXZInputStream`.

#### Licensing

XZ for Java has been put into the public domain, thus you can do whatever you want with it. All the files in the package have been written by Lasse Collin and/or Igor Pavlov.

This software is provided "as is", without any warranty.

Class Summary
ARMOptions: BCJ filter for little endian ARM instructions.
ARMThumbOptions: BCJ filter for little endian ARM-Thumb instructions.
ArrayCache: Caches large arrays for reuse (base class and a dummy cache implementation).
BasicArrayCache: A basic `ArrayCache` implementation.
CloseIgnoringInputStream: An `InputStream` wrapper whose `close()` does nothing.
DeltaInputStream: Decodes raw Delta-filtered data (no XZ headers).
DeltaOptions: Delta filter options.
FilterOptions: Base class for filter-specific options classes.
FinishableOutputStream: Output stream that supports finishing without closing the underlying stream.
FinishableWrapperOutputStream: Wraps an output stream to a finishable output stream for use with raw encoders.
IA64Options: BCJ filter for Itanium (IA-64) instructions.
LZMA2InputStream: Decompresses a raw LZMA2 stream (no XZ headers).
LZMA2Options: LZMA2 compression options.
LZMAInputStream: Decompresses legacy .lzma files and raw LZMA streams (no .lzma header).
LZMAOutputStream: Compresses into the legacy .lzma file format or into a raw LZMA stream.
PowerPCOptions: BCJ filter for big endian PowerPC instructions.
ResettableArrayCache: An ArrayCache wrapper that remembers what has been allocated and allows returning all allocations to the underlying cache at once.
SeekableFileInputStream: Wraps a `RandomAccessFile` in a SeekableInputStream.
SeekableInputStream: Input stream with random access support.
SeekableXZInputStream: Decompresses a .xz file in random access mode.
SingleXZInputStream: Decompresses exactly one XZ Stream in streamed mode (no seeking).
SPARCOptions: BCJ filter for SPARC.
X86Options: BCJ filter for x86 (32-bit and 64-bit) instructions.
XZ: XZ constants.
XZInputStream: Decompresses a .xz file in streamed mode (no seeking).
XZOutputStream: Compresses into the .xz file format.

Exception Summary
CorruptedInputException: Thrown when the compressed input data is corrupt.
MemoryLimitException: Thrown when the memory usage limit given to the XZ decompressor would be exceeded.
UnsupportedOptionsException: Thrown when compression options not supported by this implementation are detected.
XZFormatException: Thrown when the input data is not in the XZ format.
XZIOException: Generic `IOException` specific to this package.