summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-09 10:30:30 (GMT)
committerGitHub <noreply@github.com>2021-08-09 10:30:30 (GMT)
commitd5c8ad24716d146ffa025e09dad85e5a1bac5c77 (patch)
tree2682fc42a32355da969c5d19473d2a16497e85d5 /Doc/library
parent762ef85f441cdec002cb4e812b9e77ae5033e571 (diff)
downloadcpython-d5c8ad24716d146ffa025e09dad85e5a1bac5c77.zip
cpython-d5c8ad24716d146ffa025e09dad85e5a1bac5c77.tar.gz
cpython-d5c8ad24716d146ffa025e09dad85e5a1bac5c77.tar.bz2
bpo-32695: Docs and tests for compresslevel and preset kwargs in tarfile (GH-21470)
Co-Authored-By: Bo Bayles <bbayles@gmail.com> (cherry picked from commit eb2d4a66ff07aa6e51cfaaa31afed31addf76936) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/tarfile.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index 13088a1..6afb839 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -102,6 +102,9 @@ Some facts and figures:
``'x:bz2'``, :func:`tarfile.open` accepts the keyword argument
*compresslevel* (default ``9``) to specify the compression level of the file.
+ For modes ``'w:xz'`` and ``'x:xz'``, :func:`tarfile.open` accepts the
+ keyword argument *preset* to specify the compression level of the file.
+
For special purposes, there is a second format for *mode*:
``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile`
object that processes its data as a stream of blocks. No random seeking will