-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-132983: Add documentation for compression.zstd #133911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntactic review
@@ -5,13 +5,15 @@ Data Compression and Archiving | |||
****************************** | |||
|
|||
The modules described in this chapter support data compression with the zlib, | |||
gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-format | |||
gzip, bzip2, zstd, and lzma algorithms, and the creation of ZIP- and tar-format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New algorithm at the end?
gzip, bzip2, zstd, and lzma algorithms, and the creation of ZIP- and tar-format | |
gzip, bzip2, lzma, and zstd algorithms, and the creation of ZIP- and tar-format |
The :mod:`!compression` package | ||
================================= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The :mod:`!compression` package | |
================================= | |
The :mod:`!compression` package | |
=============================== |
.. note:: | ||
|
||
Several modules in :mod:`!compression` re-export modules that currently | ||
exist at the repository top-level. These re-exported modules are the new | ||
canonical import name for the respective top-level module. The existing | ||
modules are not currently deprecated and will not be removed prior to Python | ||
3.19, but users are encouraged to migrate to the new import names when | ||
feasible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. note:: | |
Several modules in :mod:`!compression` re-export modules that currently | |
exist at the repository top-level. These re-exported modules are the new | |
canonical import name for the respective top-level module. The existing | |
modules are not currently deprecated and will not be removed prior to Python | |
3.19, but users are encouraged to migrate to the new import names when | |
feasible. | |
.. attention:: | |
The :mod:`!compression` package is the new location for the data compression | |
modules in the standard library, listed below. The existing modules are not | |
deprecated and will not be removed before Python 3.19. The new ``compression.*`` | |
import names are encouraged for use where practicable. |
* :mod:`!compression.bz2` -- Re-exports :mod:`bz2` | ||
|
||
* :mod:`!compression.gzip` -- Re-exports :mod:`gzip` | ||
|
||
* :mod:`!compression.lzma` -- Re-exports :mod:`lzma` | ||
|
||
* :mod:`!compression.zlib` -- Re-exports :mod:`zlib` | ||
|
||
* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* :mod:`!compression.bz2` -- Re-exports :mod:`bz2` | |
* :mod:`!compression.gzip` -- Re-exports :mod:`gzip` | |
* :mod:`!compression.lzma` -- Re-exports :mod:`lzma` | |
* :mod:`!compression.zlib` -- Re-exports :mod:`zlib` | |
* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library | |
* :mod:`!compression.bz2` -- Re-exports :mod:`bz2` | |
* :mod:`!compression.gzip` -- Re-exports :mod:`gzip` | |
* :mod:`!compression.lzma` -- Re-exports :mod:`lzma` | |
* :mod:`!compression.zlib` -- Re-exports :mod:`zlib` | |
* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library |
|
||
* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a compressed file:: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a compressed file:: | |
Creating a compressed file: | |
.. code-block:: python |
Compressing data in memory:: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compressing data in memory:: | |
Compressing data in memory: | |
.. code-block:: python |
Incremental compression:: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incremental compression:: | |
Incremental compression: | |
.. code-block:: python |
Writing compressed data to an already-open file:: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing compressed data to an already-open file:: | |
Writing compressed data to an already-open file: | |
.. code-block:: python |
Creating a compressed file using compression parameters:: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a compressed file using compression parameters:: | |
Creating a compressed file using compression parameters: | |
.. code-block:: python |
This PR adds docs for the
compression
andcompression.zstd
modules.📚 Documentation preview 📚: https://cpython-previews--133911.org.readthedocs.build/