{
    "mode": "pydoc",
    "parameter": "_lzma",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/_lzma/json",
    "generated": "2026-06-02T15:05:00Z",
    "sections": {
        "NAME": {
            "content": "lzma\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/lzma.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.Exception(builtins.BaseException)\nLZMAError\nbuiltins.object\nLZMACompressor\nLZMADecompressor\n",
            "subsections": [
                {
                    "name": "class LZMACompressor",
                    "content": "|  LZMACompressor(format=FORMATXZ, check=-1, preset=None, filters=None)\n|\n|  Create a compressor object for compressing data incrementally.\n|\n|  format specifies the container format to use for the output. This can\n|  be FORMATXZ (default), FORMATALONE, or FORMATRAW.\n|\n|  check specifies the integrity check to use. For FORMATXZ, the default\n|  is CHECKCRC64. FORMATALONE and FORMATRAW do not support integrity\n|  checks; for these formats, check must be omitted, or be CHECKNONE.\n|\n|  The settings used by the compressor can be specified either as a\n|  preset compression level (with the 'preset' argument), or in detail\n|  as a custom filter chain (with the 'filters' argument). For FORMATXZ\n|  and FORMATALONE, the default is to use the PRESETDEFAULT preset\n|  level. For FORMATRAW, the caller must always specify a filter chain;\n|  the raw compressor does not support preset compression levels.\n|\n|  preset (if provided) should be an integer in the range 0-9, optionally\n|  OR-ed with the constant PRESETEXTREME.\n|\n|  filters (if provided) should be a sequence of dicts. Each dict should\n|  have an entry for \"id\" indicating the ID of the filter, plus\n|  additional entries for options to the filter.\n|\n|  For one-shot compression, use the compress() function instead.\n|\n|  Methods defined here:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  compress(self, data, /)\n|      Provide data to the compressor object.\n|\n|      Returns a chunk of compressed data if possible, or b'' otherwise.\n|\n|      When you have finished providing data to the compressor, call the\n|      flush() method to finish the compression process.\n|\n|  flush(self, /)\n|      Finish the compression process.\n|\n|      Returns the compressed data left in internal buffers.\n|\n|      The compressor object may not be used after this method is called.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n"
                },
                {
                    "name": "class LZMADecompressor",
                    "content": "|  LZMADecompressor(format=0, memlimit=None, filters=None)\n|\n|  Create a decompressor object for decompressing data incrementally.\n|\n|    format\n|      Specifies the container format of the input stream.  If this is\n|      FORMATAUTO (the default), the decompressor will automatically detect\n|      whether the input is FORMATXZ or FORMATALONE.  Streams created with\n|      FORMATRAW cannot be autodetected.\n|    memlimit\n|      Limit the amount of memory used by the decompressor.  This will cause\n|      decompression to fail if the input cannot be decompressed within the\n|      given limit.\n|    filters\n|      A custom filter chain.  This argument is required for FORMATRAW, and\n|      not accepted with any other format.  When provided, this should be a\n|      sequence of dicts, each indicating the ID and options for a single\n|      filter.\n|\n|  For one-shot decompression, use the decompress() function instead.\n|\n|  Methods defined here:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  decompress(self, /, data, maxlength=-1)\n|      Decompress *data*, returning uncompressed data as bytes.\n|\n|      If *maxlength* is nonnegative, returns at most *maxlength* bytes of\n|      decompressed data. If this limit is reached and further output can be\n|      produced, *self.needsinput* will be set to ``False``. In this case, the next\n|      call to *decompress()* may provide *data* as b'' to obtain more of the output.\n|\n|      If all of the input data was decompressed and returned (either because this\n|      was less than *maxlength* bytes, or because *maxlength* was negative),\n|      *self.needsinput* will be set to True.\n|\n|      Attempting to decompress data after the end of stream is reached raises an\n|      EOFError.  Any data found after the end of the stream is ignored and saved in\n|      the unuseddata attribute.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  check\n|      ID of the integrity check used by the input stream.\n|\n|  eof\n|      True if the end-of-stream marker has been reached.\n|\n|  needsinput\n|      True if more input is needed before more decompressed data can be produced.\n|\n|  unuseddata\n|      Data found after the end of the compressed stream.\n"
                },
                {
                    "name": "class LZMAError",
                    "content": "|  Call to liblzma failed.\n|\n|  Method resolution order:\n|      LZMAError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "is_check_supported",
                    "content": "Test whether the given integrity check is supported.\n\nAlways returns True for CHECKNONE and CHECKCRC32.\n"
                }
            ]
        },
        "DATA": {
            "content": "CHECKCRC32 = 1\nCHECKCRC64 = 4\nCHECKIDMAX = 15\nCHECKNONE = 0\nCHECKSHA256 = 10\nCHECKUNKNOWN = 16\nFILTERARM = 7\nFILTERARMTHUMB = 8\nFILTERDELTA = 3\nFILTERIA64 = 6\nFILTERLZMA1 = 4611686018427387905\nFILTERLZMA2 = 33\nFILTERPOWERPC = 5\nFILTERSPARC = 9\nFILTERX86 = 4\nFORMATALONE = 2\nFORMATAUTO = 0\nFORMATRAW = 3\nFORMATXZ = 1\nMFBT2 = 18\nMFBT3 = 19\nMFBT4 = 20\nMFHC3 = 3\nMFHC4 = 4\nMODEFAST = 1\nMODENORMAL = 2\nPRESETDEFAULT = 6\nPRESETEXTREME = 2147483648\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/lib-dynload/lzma.cpython-310-x8664-linux-gnu.so\n\n",
            "subsections": []
        }
    },
    "summary": "lzma",
    "flags": [],
    "examples": [],
    "see_also": []
}