|
407 | 407 | ] = """compression : str or dict, default 'infer' |
408 | 408 | For on-the-fly compression of the output data. If 'infer' and '%s' |
409 | 409 | path-like, then detect compression from the following extensions: '.gz', |
410 | | - '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression). Set to |
411 | | - ``None`` for no compression. Can also be a dict with key ``'method'`` set |
| 410 | + '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' |
| 411 | + (otherwise no compression). |
| 412 | + Set to ``None`` for no compression. |
| 413 | + Can also be a dict with key ``'method'`` set |
412 | 414 | to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'tar'``} and other |
413 | | - key-value pairs are forwarded to ``zipfile.ZipFile``, ``gzip.GzipFile``, |
414 | | - ``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or ``tarfile.TarFile``, respectively. As an |
415 | | - example, the following could be passed for faster compression and to create |
| 415 | + key-value pairs are forwarded to |
| 416 | + ``zipfile.ZipFile``, ``gzip.GzipFile``, |
| 417 | + ``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or |
| 418 | + ``tarfile.TarFile``, respectively. |
| 419 | + As an example, the following could be passed for faster compression and to create |
416 | 420 | a reproducible gzip archive: |
417 | 421 | ``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.""" |
418 | 422 |
|
|
421 | 425 | ] = """compression : str or dict, default 'infer' |
422 | 426 | For on-the-fly decompression of on-disk data. If 'infer' and '%s' is |
423 | 427 | path-like, then detect compression from the following extensions: '.gz', |
424 | | - '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression). If using |
425 | | - 'zip' or 'tar', the ZIP file must contain only one data file to be read in. Set to |
426 | | - ``None`` for no decompression. Can also be a dict with key ``'method'`` set |
| 428 | + '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' |
| 429 | + (otherwise no compression). |
| 430 | + If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in. |
| 431 | + Set to ``None`` for no decompression. |
| 432 | + Can also be a dict with key ``'method'`` set |
427 | 433 | to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'tar'``} and other |
428 | | - key-value pairs are forwarded to ``zipfile.ZipFile``, ``gzip.GzipFile``, |
429 | | - ``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or ``tarfile.TarFile``, respectively. As an |
430 | | - example, the following could be passed for Zstandard decompression using a |
| 434 | + key-value pairs are forwarded to |
| 435 | + ``zipfile.ZipFile``, ``gzip.GzipFile``, |
| 436 | + ``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or |
| 437 | + ``tarfile.TarFile``, respectively. |
| 438 | + As an example, the following could be passed for Zstandard decompression using a |
431 | 439 | custom compression dictionary: |
432 | 440 | ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``.""" |
433 | 441 |
|
|
0 commit comments