-
-
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
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
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.
Some grammar notes.
Code block directives need a line after.
Please settle on gaps between descriptions for the file, currently it seems random, some parts use two and others one.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
cc @python/proofreaders, I think the text here could benefit from a close reading, Stan has already noted several English grammar/syntax points. |
Are there any active members, out of curiosity? I do not know of any nor have seen any around.
I will go through it again later. |
|
||
-------------- | ||
|
||
This module provides classes and convenience functions for compressing and |
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.
This module provides classes and convenience functions for compressing and | |
This module provides classes and functions for compressing and |
Unnecessary and awkward
This module provides classes and convenience functions for compressing and | ||
decompressing data using the Zstandard (or "zstd") compression algorithm. Also | ||
included is a file interface supporting reading and writing contents of ``.zst`` | ||
files created from the :program:`zstd` utility, as well as raw zstd compressed |
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.
files created from the :program:`zstd` utility, as well as raw zstd compressed | |
files created with the :program:`zstd` utility, as well as raw zstd compressed |
files created from the :program:`zstd` utility, as well as raw zstd compressed | |
files created by the :program:`zstd` utility, as well as raw zstd compressed |
Grammar
-------------- | ||
|
||
This module provides classes and convenience functions for compressing and | ||
decompressing data using the Zstandard (or "zstd") compression algorithm. Also |
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.
decompressing data using the Zstandard (or "zstd") compression algorithm. Also | |
decompressing data using the Zstandard (or *zstd*) compression algorithm. Also |
Italics are more fitting here
|
||
This module provides classes and convenience functions for compressing and | ||
decompressing data using the Zstandard (or "zstd") compression algorithm. Also | ||
included is a file interface supporting reading and writing contents of ``.zst`` |
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.
included is a file interface supporting reading and writing contents of ``.zst`` | |
included is a file interface that supports reading and writing the contents of ``.zst`` files. |
:class:`Strategy` classes for setting advanced (de)compression parameters. | ||
|
||
|
||
.. exception:: ZstdError |
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.
This should get a little introduction like other modules.
"This module provides the following exception: "
Or something along those lines.
argument should not be used. | ||
|
||
When opening a file for writing, the *options* argument can be a dictionary | ||
providing advanced decompression parameters, see |
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.
providing advanced decompression parameters, see | |
providing advanced decompression parameters; see |
*zstd_dict* argument is a :class:`ZstdDict` instance to be used during | ||
compression. | ||
|
||
For binary mode, this function is equivalent to the :class:`ZstdFile` |
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.
For binary mode, this function is equivalent to the :class:`ZstdFile` | |
In binary mode, this function is equivalent to the :class:`ZstdFile` |
constructor: ``ZstdFile(file, mode, ...)``. In this case, the | ||
*encoding*, *errors* and *newline* parameters must not be provided. | ||
|
||
For text mode, a :class:`ZstdFile` object is created, and wrapped in an |
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.
For text mode, a :class:`ZstdFile` object is created, and wrapped in an | |
In text mode, a :class:`ZstdFile` object is created, and wrapped in an |
|
||
For text mode, a :class:`ZstdFile` object is created, and wrapped in an | ||
:class:`io.TextIOWrapper` instance with the specified encoding, error handling | ||
behavior, and line ending(s). |
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.
behavior, and line ending(s). | |
behavior, and line endings. |
Unnecessary IMO
|
||
For binary mode, this function is equivalent to the :class:`ZstdFile` | ||
constructor: ``ZstdFile(file, mode, ...)``. In this case, the | ||
*encoding*, *errors* and *newline* parameters must not be provided. |
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.
*encoding*, *errors* and *newline* parameters must not be provided. | |
*encoding*, *errors*, and *newline* parameters must not be provided. |
🙋 I at least look at all pings to the group. Will usually weigh in if I have time, and as long as no one else has beaten me to what I'd have to say. |
This PR adds docs for the
compression
andcompression.zstd
modules.📚 Documentation preview 📚: https://cpython-previews--133911.org.readthedocs.build/