On this page
lzma.LZMADecompressor
Prev: lzma.LZMACompressor | Up: lzma | Next: lzma.LZMAError
Rel: lzma.compress, lzma.decompress, lzma.is_check_supported, lzma.LZMACompressor
Ref: docs.python.org — lzma.LZMADecompressor
Tags: #public #python3 #stdlib #lzma
Import
import lzma
from lzma import LZMADecompressor
Signature & Overview
lzma.LZMADecompressor(format=0, memlimit=None, filters=None)
Create a decompressor object for decompressing data incrementally.
Methods & Attributes
LZMADecompressor.decompress(self, /, data, max_length=-1)— Decompress data, returning uncompressed data as bytes.
Usage
import lzma
blob = lzma.compress(b"streamed")
dec = lzma.LZMADecompressor()
assert dec.decompress(blob) == b"streamed" and dec.eof is True
Gotchas
- Pass
memlimit=andmax_length=on untrusted.xzinputs to prevent memory exhaustion.
REPL Inspect
from lzma import LZMADecompressor
help(LZMADecompressor)
Linked from
Related notes
- tuts/python3/stdlib_module/lzma/compress Linked here; links to this page; shared tags: #lzma, #stdlib
- tuts/python3/stdlib_module/lzma/decompress Linked here; links to this page; shared tags: #lzma, #stdlib
- tuts/python3/stdlib_module/lzma/is_check_supported Linked here; links to this page; shared tags: #lzma, #stdlib
- tuts/python3/stdlib_module/lzma/LZMACompressor Linked here; links to this page; shared tags: #lzma, #stdlib
- tuts/python3/stdlib_module/lzma/LZMAError Linked here; links to this page; shared tags: #lzma, #stdlib
- tuts/python3/stdlib_module/lzma Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/lzma/LZMAFile shared tags: #lzma, #stdlib
- tuts/python3/stdlib_module/lzma/open shared tags: #lzma, #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib