lzma.LZMADecompressor.unused_data

unused_data Data found after the end of the compressed stream. Before the end of the stream is reached, this will be b"".

lzma.LZMADecompressor.needs_input

needs_input False if the decompress() method can provide more decompressed data before requiring new uncompressed input. New in version 3.5.

lzma.LZMADecompressor.eof

eof True if the end-of-stream marker has been reached.

lzma.LZMADecompressor.decompress()

decompress(data, max_length=-1) Decompress data (a bytes-like object), returning uncompressed data as bytes. Some of data may be buffered internally, for use in later calls to decompress(). The returned data should be concatenated with the output of any previous calls to decompress(). If max_length is nonnegative, returns at most max_length bytes of decompressed data. If this limit is reached and further output can be produced, the needs_input attribute will be set to False. In this case, th

lzma.LZMADecompressor.check

check The ID of the integrity check used by the input stream. This may be CHECK_UNKNOWN until enough of the input has been decoded to determine what integrity check it uses.

lzma.LZMADecompressor

class lzma.LZMADecompressor(format=FORMAT_AUTO, memlimit=None, filters=None) Create a decompressor object, which can be used to decompress data incrementally. For a more convenient way of decompressing an entire compressed stream at once, see decompress(). The format argument specifies the container format that should be used. The default is FORMAT_AUTO, which can decompress both .xz and .lzma files. Other possible values are FORMAT_XZ, FORMAT_ALONE, and FORMAT_RAW. The memlimit argument spe

lzma.LZMACompressor.flush()

flush() Finish the compression process, returning a bytes object containing any data stored in the compressor’s internal buffers. The compressor cannot be used after this method has been called.

lzma.LZMACompressor.compress()

compress(data) Compress data (a bytes object), returning a bytes object containing compressed data for at least part of the input. Some of data may be buffered internally, for use in later calls to compress() and flush(). The returned data should be concatenated with the output of any previous calls to compress().

lzma.LZMACompressor

class lzma.LZMACompressor(format=FORMAT_XZ, check=-1, preset=None, filters=None) Create a compressor object, which can be used to compress data incrementally. For a more convenient way of compressing a single chunk of data, see compress(). The format argument specifies what container format should be used. Possible values are: FORMAT_XZ: The .xz container format. This is the default format. FORMAT_ALONE: The legacy .lzma container format. This format is more limited than .xz – it d

lzma.is_check_supported()

lzma.is_check_supported(check) Returns true if the given integrity check is supported on this system. CHECK_NONE and CHECK_CRC32 are always supported. CHECK_CRC64 and CHECK_SHA256 may be unavailable if you are using a version of liblzma that was compiled with a limited feature set.