MCPcopy Index your code
hub / github.com/python/cpython / _zstd_decompress

Function _zstd_decompress

Lib/zipimport.py:615–628  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

613
614
615def _zstd_decompress(data):
616 # A simple version of compression.zstd.decompress() as we cannot import
617 # that here as the stdlib itself could be being zipimported.
618 results = []
619 while True:
620 decomp = _get_zstd_decompressor_class()()
621 results.append(decomp.decompress(data))
622 if not decomp.eof:
623 raise ZipImportError("zipimport: zstd compressed data ended before "
624 "the end-of-stream marker")
625 data = decomp.unused_data
626 if not data:
627 break
628 return b"".join(results)
629
630
631# Given a path to a Zip file and a toc_entry, return the (uncompressed) data.

Callers 1

_get_dataFunction · 0.85

Calls 5

ZipImportErrorClass · 0.85
decompressMethod · 0.80
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…