Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't reference self when referring to items
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
  • Loading branch information
emmatyping and hugovk authored May 14, 2025
commit 987bd2788c8d19df316bc445aa1e92beb55af818
18 changes: 9 additions & 9 deletions Doc/library/compression.zstd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Reading and writing compressed files
When opening a file for reading, the *options* argument can be a dictionary
Comment thread
vadmium marked this conversation as resolved.
Outdated
providing advanced decompression parameters, see
Comment thread
emmatyping marked this conversation as resolved.
Outdated
:class:`DecompressionParameter` for detailed information about supported
Comment thread
emmatyping marked this conversation as resolved.
parameters. The *zstd_dict* argument is a :class:`ZstdDict` instance to be
parameters. The *zstd_dict* argument is a :class:`!ZstdDict` instance to be
Comment thread
emmatyping marked this conversation as resolved.
Outdated
used during decompression. When opening a file for reading, the *level*
argument should not be used.

Expand All @@ -111,13 +111,13 @@ Reading and writing compressed files
:class:`CompressionParameter` for detailed information about supported
parameters. The *level* argument is the compression level to use when
writing compressed data. Only one of *level* or *options* may be passed. The
*zstd_dict* argument is a :class:`ZstdDict` instance to be used during
*zstd_dict* argument is a :class:`!ZstdDict` instance to be used during
compression.

When opening a file for writing, the *options*, *zstd_dict* and *level*
arguments have the same meanings as for :class:`ZstdCompressor`.

:class:`ZstdFile` supports all the members specified by
:class:`!ZstdFile` supports all the members specified by
:class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach`
and :meth:`~io.IOBase.truncate`.
Iteration and the :keyword:`with` statement are supported.
Expand Down Expand Up @@ -231,7 +231,7 @@ Compressing and decompressing data in memory
Compress *data* (a :term:`bytes-like object`), returning a :class:`bytes`
object if possible, or an empty byte string otherwise. Some of *data* may
be buffered internally, for use in later calls to
:meth:`~.compress` and :meth:`~.flush`. The
:meth:`!compress` and :meth:`~.flush`. The
returned data should be concatenated with the output of any previous calls
to :meth:`~.compress`.

Expand Down Expand Up @@ -273,15 +273,15 @@ Compressing and decompressing data in memory
compressed frames, unlike the :func:`decompress` function and
:class:`ZstdFile` class. To decompress a multi-frame input, you should
use :func:`decompress`, :class:`ZstdFile` if working with a
:term:`file object`, or multiple :class:`ZstdDecompressor` instances.
:term:`file object`, or multiple :class:`!ZstdDecompressor` instances.

.. method:: decompress(data, max_length=-1)

Decompress *data* (a :term:`bytes-like object`), returning
uncompressed data as bytes. Some of *data* may be buffered
internally, for use in later calls to :meth:`~.decompress`.
internally, for use in later calls to :meth:`!decompress`.
The returned data should be concatenated with the output of any previous
calls to :meth:`~.decompress`.
calls to :meth:`!decompress`.

If *max_length* is non-negative, returns at most *max_length*
Comment thread
emmatyping marked this conversation as resolved.
Outdated
bytes of decompressed data. If this limit is reached and further
Expand Down Expand Up @@ -395,7 +395,7 @@ Zstandard dictionaries

.. note::

The meaning of ``0`` for :attr:`ZstdDict.dict_id` is different from
The meaning of ``0`` for :attr:`!ZstdDict.dict_id` is different from
the ``dictionary_id`` argument to the :func:`get_frame_info`
Comment thread
emmatyping marked this conversation as resolved.
Outdated
function.

Expand Down Expand Up @@ -598,7 +598,7 @@ Advanced parameter control
.. attribute:: nb_workers

Select how many threads will be spawned to compress in parallel. When
:attr:`~.nb_workers` >= 1, enables multi-threaded compression, 1
:attr:`!nb_workers` >= 1, enables multi-threaded compression, 1
means "1-thread multi-threaded mode". More workers improve speed, but
also increase memory usage and slightly reduce compression ratio.

Expand Down