# _lzma - pydoc - phpman

Help on module _lzma:

## NAME
    _lzma

## MODULE REFERENCE
    <https://docs.python.org/3.10/library/_lzma.html>

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

## CLASSES
    builtins.Exception(builtins.BaseException)
        LZMAError
    builtins.object
        LZMACompressor
        LZMADecompressor

### class LZMACompressor
     |  LZMACompressor(format=FORMAT_XZ, check=-1, preset=None, filters=None)
     |
     |  Create a compressor object for compressing data incrementally.
     |
     |  format specifies the container format to use for the output. This can
     |  be FORMAT_XZ (default), FORMAT_ALONE, or FORMAT_RAW.
     |
     |  check specifies the integrity check to use. For FORMAT_XZ, the default
     |  is CHECK_CRC64. FORMAT_ALONE and FORMAT_RAW do not support integrity
     |  checks; for these formats, check must be omitted, or be CHECK_NONE.
     |
     |  The settings used by the compressor can be specified either as a
     |  preset compression level (with the 'preset' argument), or in detail
     |  as a custom filter chain (with the 'filters' argument). For FORMAT_XZ
     |  and FORMAT_ALONE, the default is to use the PRESET_DEFAULT preset
     |  level. For FORMAT_RAW, the caller must always specify a filter chain;
     |  the raw compressor does not support preset compression levels.
     |
     |  preset (if provided) should be an integer in the range 0-9, optionally
     |  OR-ed with the constant PRESET_EXTREME.
     |
     |  filters (if provided) should be a sequence of dicts. Each dict should
     |  have an entry for "id" indicating the ID of the filter, plus
     |  additional entries for options to the filter.
     |
     |  For one-shot compression, use the compress() function instead.
     |
     |  Methods defined here:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  compress(self, data, /)
     |      Provide data to the compressor object.
     |
     |      Returns a chunk of compressed data if possible, or b'' otherwise.
     |
     |      When you have finished providing data to the compressor, call the
     |      flush() method to finish the compression process.
     |
     |  flush(self, /)
     |      Finish the compression process.
     |
     |      Returns the compressed data left in internal buffers.
     |
     |      The compressor object may not be used after this method is called.
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.

### class LZMADecompressor
     |  LZMADecompressor(format=0, memlimit=None, filters=None)
     |
     |  Create a decompressor object for decompressing data incrementally.
     |
     |    format
     |      Specifies the container format of the input stream.  If this is
     |      FORMAT_AUTO (the default), the decompressor will automatically detect
     |      whether the input is FORMAT_XZ or FORMAT_ALONE.  Streams created with
     |      FORMAT_RAW cannot be autodetected.
     |    memlimit
     |      Limit the amount of memory used by the decompressor.  This will cause
     |      decompression to fail if the input cannot be decompressed within the
     |      given limit.
     |    filters
     |      A custom filter chain.  This argument is required for FORMAT_RAW, and
     |      not accepted with any other format.  When provided, this should be a
     |      sequence of dicts, each indicating the ID and options for a single
     |      filter.
     |
     |  For one-shot decompression, use the decompress() function instead.
     |
     |  Methods defined here:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  decompress(self, /, data, max_length=-1)
     |      Decompress *data*, returning uncompressed data as bytes.
     |
     |      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, *self.needs_input* will be set to ``False``. In this case, the next
     |      call to *decompress()* may provide *data* as b'' to obtain more of the output.
     |
     |      If all of the input data was decompressed and returned (either because this
     |      was less than *max_length* bytes, or because *max_length* was negative),
     |      *self.needs_input* will be set to True.
     |
     |      Attempting to decompress data after the end of stream is reached raises an
     |      EOFError.  Any data found after the end of the stream is ignored and saved in
     |      the unused_data attribute.
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  check
     |      ID of the integrity check used by the input stream.
     |
     |  eof
     |      True if the end-of-stream marker has been reached.
     |
     |  needs_input
     |      True if more input is needed before more decompressed data can be produced.
     |
     |  unused_data
     |      Data found after the end of the compressed stream.

### class LZMAError
     |  Call to liblzma failed.
     |
     |  Method resolution order:
     |      LZMAError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Data descriptors defined here:
     |
     |  __weakref__
     |      list of weak references to the object (if defined)
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.Exception:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  __setstate__(...)
     |
     |  __str__(self, /)
     |      Return str(self).
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

## FUNCTIONS
### is_check_supported
        Test whether the given integrity check is supported.

        Always returns True for CHECK_NONE and CHECK_CRC32.

## DATA
    CHECK_CRC32 = 1
    CHECK_CRC64 = 4
    CHECK_ID_MAX = 15
    CHECK_NONE = 0
    CHECK_SHA256 = 10
    CHECK_UNKNOWN = 16
    FILTER_ARM = 7
    FILTER_ARMTHUMB = 8
    FILTER_DELTA = 3
    FILTER_IA64 = 6
    FILTER_LZMA1 = 4611686018427387905
    FILTER_LZMA2 = 33
    FILTER_POWERPC = 5
    FILTER_SPARC = 9
    FILTER_X86 = 4
    FORMAT_ALONE = 2
    FORMAT_AUTO = 0
    FORMAT_RAW = 3
    FORMAT_XZ = 1
    MF_BT2 = 18
    MF_BT3 = 19
    MF_BT4 = 20
    MF_HC3 = 3
    MF_HC4 = 4
    MODE_FAST = 1
    MODE_NORMAL = 2
    PRESET_DEFAULT = 6
    PRESET_EXTREME = 2147483648

## FILE
    /usr/lib/python3.10/lib-dynload/_lzma.cpython-310-x86_64-linux-gnu.so


