MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / decompress

Method decompress

tools/python-3.11.9-amd64/Lib/zipfile.py:662–680  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

660 self.eof = False
661
662 def decompress(self, data):
663 if self._decomp is None:
664 self._unconsumed += data
665 if len(self._unconsumed) <= 4:
666 return b''
667 psize, = struct.unpack('<H', self._unconsumed[2:4])
668 if len(self._unconsumed) <= 4 + psize:
669 return b''
670
671 self._decomp = lzma.LZMADecompressor(lzma.FORMAT_RAW, filters=[
672 lzma._decode_filter_properties(lzma.FILTER_LZMA1,
673 self._unconsumed[4:4 + psize])
674 ])
675 data = self._unconsumed[4 + psize:]
676 del self._unconsumed
677
678 result = self._decomp.decompress(data)
679 self.eof = self._decomp.eof
680 return result
681
682
683compressor_names = {

Callers 7

decompressFunction · 0.95
_readMethod · 0.45
readMethod · 0.45
readMethod · 0.45
decompressFunction · 0.45
decompressFunction · 0.45
_read1Method · 0.45

Calls 1

unpackMethod · 0.45

Tested by

no test coverage detected