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

Function _check_compression

tools/python-3.11.9-amd64/Lib/zipfile.py:703–719  ·  view source on GitHub ↗
(compression)

Source from the content-addressed store, hash-verified

701}
702
703def _check_compression(compression):
704 if compression == ZIP_STORED:
705 pass
706 elif compression == ZIP_DEFLATED:
707 if not zlib:
708 raise RuntimeError(
709 "Compression requires the (missing) zlib module")
710 elif compression == ZIP_BZIP2:
711 if not bz2:
712 raise RuntimeError(
713 "Compression requires the (missing) bz2 module")
714 elif compression == ZIP_LZMA:
715 if not lzma:
716 raise RuntimeError(
717 "Compression requires the (missing) lzma module")
718 else:
719 raise NotImplementedError("That compression method is not supported")
720
721
722def _get_compressor(compress_type, compresslevel=None):

Callers 3

_get_decompressorFunction · 0.85
__init__Method · 0.85
_writecheckMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected