PyDocs

Data Compression and Archiving

lzma

Interface to the liblzma compression library.

This module provides a class for reading and writing compressed files,
classes for incremental (de)compression, and convenience functions for
one-shot (de)compression.

These classes and functions support both the XZ and legacy LZMA
container formats, as well as raw compressed data streams.
Symbols in lzma

c

CHECK_CRC32
A 32-bit Cyclic Redundancy Check.
CHECK_CRC64
A 64-bit Cyclic Redundancy Check.
CHECK_ID_MAX
The largest supported integrity-check ID.
CHECK_NONE
No integrity check.
CHECK_SHA256
A 256-bit Secure Hash Algorithm.
CHECK_UNKNOWN
The integrity check used by a stream could not yet be determined.
compress
Compress a block of data.

d

decompress
Decompress a block of data.

f

FILTER_DELTA
The delta filter.
FILTER_LZMA1
The LZMA1 and LZMA2 compression filters.
FILTER_LZMA2
The LZMA1 and LZMA2 compression filters.
FORMAT_ALONE
The legacy .lzma container format.
FORMAT_AUTO
Used for decompression only.
FORMAT_RAW
A raw data stream, not using any container format.
FORMAT_XZ
The .xz container format.

i

is_check_supported
Test whether the given integrity check is supported.

l

LZMACompressor
Create a compressor object for compressing data incrementally.
LZMADecompressor
Create a decompressor object for decompressing data incrementally.
LZMAError
Call to liblzma failed.
LZMAFile
A file object providing transparent LZMA (de)compression.

m

MF_BT2
Match finders that may be used as the mf option of a filter specifier (see Specifying custom filter chains).
MF_BT3
Match finders that may be used as the mf option of a filter specifier (see Specifying custom filter chains).
MF_BT4
Match finders that may be used as the mf option of a filter specifier (see Specifying custom filter chains).
MF_HC3
Match finders that may be used as the mf option of a filter specifier (see Specifying custom filter chains).
MF_HC4
Match finders that may be used as the mf option of a filter specifier (see Specifying custom filter chains).
MODE_FAST
Compression modes that may be used as the mode option of a filter specifier (see Specifying custom filter chains).
MODE_NORMAL
Compression modes that may be used as the mode option of a filter specifier (see Specifying custom filter chains).

o

open
Open an LZMA-compressed file in binary or text mode.

p

PRESET_DEFAULT
The default compression preset, equivalent to preset level 6.
PRESET_EXTREME
A flag that may be bitwise OR-ed with a preset level (0 to 9) to select a slower but more thorough variant of that preset.