Home
last modified time | relevance | path

Searched refs:compresslevel (Results 1 – 19 of 19) sorted by relevance

/third_party/python/Lib/
Dbz2.py37 def __init__(self, filename, mode="r", *, compresslevel=9): argument
59 if not (1 <= compresslevel <= 9):
68 self._compressor = BZ2Compressor(compresslevel)
72 self._compressor = BZ2Compressor(compresslevel)
76 self._compressor = BZ2Compressor(compresslevel)
271 def open(filename, mode="rb", compresslevel=9, argument
304 binary_file = BZ2File(filename, bz_mode, compresslevel=compresslevel)
313 def compress(data, compresslevel=9): argument
320 comp = BZ2Compressor(compresslevel)
Dgzip.py25 def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST, argument
58 binary_file = GzipFile(filename, gz_mode, compresslevel)
60 binary_file = GzipFile(None, gz_mode, compresslevel, filename)
135 compresslevel=_COMPRESS_LEVEL_BEST, fileobj=None, mtime=None): argument
201 self.compress = zlib.compressobj(compresslevel,
213 self._write_gzip_header(compresslevel)
240 def _write_gzip_header(self, compresslevel): argument
261 if compresslevel == _COMPRESS_LEVEL_BEST:
263 elif compresslevel == _COMPRESS_LEVEL_FAST:
543 def compress(data, compresslevel=_COMPRESS_LEVEL_BEST, *, mtime=None): argument
[all …]
Dzipfile.py682 def _get_compressor(compress_type, compresslevel=None): argument
684 if compresslevel is not None:
685 return zlib.compressobj(compresslevel, zlib.DEFLATED, -15)
688 if compresslevel is not None:
689 return bz2.BZ2Compressor(compresslevel)
1208 compresslevel=None, *, strict_timestamps=True): argument
1222 self.compresslevel = compresslevel
1500 zinfo._compresslevel = self.compresslevel
1717 compress_type=None, compresslevel=None): argument
1740 if compresslevel is not None:
[all …]
Dtarfile.py1666 def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs): argument
1679 fileobj = GzipFile(name, mode + "b", compresslevel, fileobj)
1699 def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs): argument
1711 fileobj = BZ2File(fileobj or name, mode, compresslevel=compresslevel)
/third_party/python/Doc/library/
Dbz2.rst32 .. function:: open(filename, mode='rb', compresslevel=9, encoding=None, errors=None, newline=None)
45 The *compresslevel* argument is an integer from 1 to 9, as for the
49 constructor: ``BZ2File(filename, mode, compresslevel=compresslevel)``. In
66 .. class:: BZ2File(filename, mode='r', *, compresslevel=9)
82 If *mode* is ``'w'`` or ``'a'``, *compresslevel* can be an integer between
139 The *compresslevel* parameter became keyword-only.
150 .. class:: BZ2Compressor(compresslevel=9)
156 *compresslevel*, if given, must be an integer between ``1`` and ``9``. The
240 .. function:: compress(data, compresslevel=9)
244 *compresslevel*, if given, must be an integer between ``1`` and ``9``. The
Dgzip.rst29 .. function:: open(filename, mode='rb', compresslevel=9, encoding=None, errors=None, newline=None)
41 The *compresslevel* argument is an integer from 0 to 9, as for the
45 constructor: ``GzipFile(filename, mode, compresslevel)``. In this case, the
70 .. class:: GzipFile(filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None)
98 The *compresslevel* argument is an integer from ``0`` to ``9`` controlling
173 .. function:: compress(data, compresslevel=9, *, mtime=None)
176 the compressed data. *compresslevel* and *mtime* have the same meaning as in
Dzipfile.rst142 compresslevel=None, *, strict_timestamps=True)
172 The *compresslevel* parameter controls the compression level to use when
218 Add the *compresslevel* parameter.
388 compresslevel=None)
394 the new entry. Similarly, *compresslevel* will override the constructor if
420 compresslevel=None)
432 (if that is a :class:`ZipInfo` instance). Similarly, *compresslevel* will
Dtarfile.rst103 *compresslevel* (default ``9``) to specify the compression level of the file.
/third_party/python/Modules/
D_bz2module.c315 _bz2_BZ2Compressor___init___impl(BZ2Compressor *self, int compresslevel) in _bz2_BZ2Compressor___init___impl() argument
319 if (!(1 <= compresslevel && compresslevel <= 9)) { in _bz2_BZ2Compressor___init___impl()
334 bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); in _bz2_BZ2Compressor___init___impl()
361 int compresslevel = 9; in _bz2_BZ2Compressor___init__() local
372 compresslevel = _PyLong_AsInt(PyTuple_GET_ITEM(args, 0)); in _bz2_BZ2Compressor___init__()
373 if (compresslevel == -1 && PyErr_Occurred()) { in _bz2_BZ2Compressor___init__()
377 return_value = _bz2_BZ2Compressor___init___impl((BZ2Compressor *)self, compresslevel); in _bz2_BZ2Compressor___init__()
/third_party/python/Lib/test/
Dtest_bz2.py80 BIG_DATA = bz2.compress(BIG_TEXT, compresslevel=1)
103 self.assertRaises(ValueError, BZ2File, os.devnull, compresslevel=0)
104 self.assertRaises(ValueError, BZ2File, os.devnull, compresslevel=10)
267 expected = bz2.compress(self.TEXT, compresslevel=5)
268 with BZ2File(self.filename, "w", compresslevel=5) as bz2f:
562 bomb = bz2.compress(b'\0' * int(2e6), compresslevel=9)
Dtest_gzip.py146 compressed = gzip.compress(data1, compresslevel=1)
384 fWrite = gzip.GzipFile(self.filename, 'w', compresslevel=level)
524 bomb = gzip.compress(b'\0' * int(2e6), compresslevel=9)
Dtest_zipfile.py60 def make_test_archive(self, f, compression, compresslevel=None): argument
61 kwargs = {'compression': compression, 'compresslevel': compresslevel}
71 def zip_test(self, f, compression, compresslevel=None): argument
72 self.make_test_archive(f, compression, compresslevel)
306 zipfp = zipfile.ZipFile(TESTFN2, "w", compresslevel=1)
309 compresslevel=2)
396 self.zip_test(f, self.compression, compresslevel=9)
401 with zipfile.ZipFile(TESTFN2, "w", compresslevel=1) as zipfp:
403 zipfp.write(TESTFN, 'compress_9', compresslevel=9)
Dtest_tarfile.py843 with bz2.BZ2File(tmpname, "wb", compresslevel=1) as fobj:
1725 with tarfile.open(tmpname, self.mode, compresslevel=1) as tobj:
1727 with tarfile.open(tmpname, 'r:gz', compresslevel=1) as tobj:
1734 with tarfile.open(tmpname, self.mode, compresslevel=1) as tobj:
1736 with tarfile.open(tmpname, 'r:bz2', compresslevel=1) as tobj:
/third_party/skia/third_party/externals/angle2/src/libANGLE/renderer/vulkan/
Dgen_vk_internal_shaders.py322 with gzip.GzipFile(fileobj=buf, mode='wb', compresslevel=9, mtime=0) as f:
/third_party/python/Misc/NEWS.d/
D3.10.0rc2.rst414 The *compresslevel* and *preset* keyword arguments of :func:`tarfile.open`
D3.9.0a3.rst351 open file object, to control how the file is opened. The *compresslevel*
/third_party/python/Lib/xmlrpc/
Dclient.py1049 with gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) as gzf:
/third_party/python/Doc/whatsnew/
D3.9.rst1075 * The *compresslevel* parameter of :class:`bz2.BZ2File` became keyword-only,
D3.7.rst1635 :class:`~zipfile.ZipFile` now accepts the new *compresslevel* parameter to