File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -812,11 +812,11 @@ def _get_compressor(compress_type, compresslevel=None):
812812 if compresslevel is not None :
813813 return bz2 .BZ2Compressor (compresslevel )
814814 return bz2 .BZ2Compressor ()
815- # compresslevel is ignored for ZIP_LZMA and ZIP_ZSTANDARD
815+ # compresslevel is ignored for ZIP_LZMA
816816 elif compress_type == ZIP_LZMA :
817817 return LZMACompressor ()
818818 elif compress_type == ZIP_ZSTANDARD :
819- return zstd .ZstdCompressor ()
819+ return zstd .ZstdCompressor (level = compresslevel )
820820 else :
821821 return None
822822
@@ -1362,6 +1362,7 @@ class ZipFile:
13621362 When using ZIP_STORED or ZIP_LZMA this keyword has no effect.
13631363 When using ZIP_DEFLATED integers 0 through 9 are accepted.
13641364 When using ZIP_BZIP2 integers 1 through 9 are accepted.
1365+ When using ZIP_ZSTANDARD integers are accepted.
13651366
13661367 """
13671368
You can’t perform that action at this time.
0 commit comments