Skip to content

Commit b3fd3cd

Browse files
committed
Resolve review suggestions
- Use "integer" instead of "int object" - Use > 0 rather than >=1 for nb_workers
1 parent daa9df1 commit b3fd3cd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Doc/library/compression.zstd.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Compressing and decompressing data in memory
158158
Compress *data* (a :term:`bytes-like object`), returning the compressed
159159
data as a :class:`bytes` object.
160160

161-
The *level* argument is an int object controlling the level of
161+
The *level* argument is an integer controlling the level of
162162
compression. *level* is an alternative to setting
163163
:attr:`CompressionParameter.compression_level` in *options*. Use
164164
:meth:`~CompressionParameter.bounds` on
@@ -202,7 +202,7 @@ Compressing and decompressing data in memory
202202
For a more convenient way of compressing a single chunk of data, see the
203203
module-level function :func:`compress`.
204204

205-
The *level* argument is an int object controlling the level of
205+
The *level* argument is an integer controlling the level of
206206
compression. *level* is an alternative to setting
207207
:attr:`CompressionParameter.compression_level` in *options*. Use
208208
:meth:`~CompressionParameter.bounds` on
@@ -575,7 +575,7 @@ Advanced parameter control
575575
inputs by finding large matches at greater distances. It increases memory
576576
usage and window size.
577577

578-
``True`` or ``0`` enable long distance matching while ``False`` or ``1``
578+
``True`` or ``1`` enable long distance matching while ``False`` or ``0``
579579
disable it.
580580

581581
Enabling this parameter increases default
@@ -622,23 +622,23 @@ Advanced parameter control
622622
the checksum. If there is a mismatch a :class:`ZstdError` exception is
623623
raised.
624624

625-
``True`` or ``0`` enable checksum generation while ``False`` or ``1``
625+
``True`` or ``1`` enable checksum generation while ``False`` or ``0``
626626
disable it.
627627

628628
.. attribute:: dict_id_flag
629629

630630
When compressing with a :class:`ZstdDict`, the dictionary's ID is written
631631
into the frame header.
632632

633-
``True`` or ``0`` enable storing the dictionary ID while ``False`` or
634-
``1`` disable it.
633+
``True`` or ``1`` enable storing the dictionary ID while ``False`` or
634+
``0`` disable it.
635635

636636
.. attribute:: nb_workers
637637

638638
Select how many threads will be spawned to compress in parallel. When
639-
:attr:`!nb_workers` >= 1, enables multi-threaded compression, 1
640-
means "one-thread multi-threaded mode". More workers improve speed, but
641-
also increase memory usage and slightly reduce compression ratio.
639+
:attr:`!nb_workers` > 0, enables multi-threaded compression, a value of
640+
``1`` means "one-thread multi-threaded mode". More workers improve speed,
641+
but also increase memory usage and slightly reduce compression ratio.
642642

643643
A value of zero disables multi-threading.
644644

@@ -753,7 +753,7 @@ Miscellaneous
753753

754754
.. attribute:: dictionary_id
755755

756-
An int object representing the Zstandard dictionary ID needed for
756+
An integer representing the Zstandard dictionary ID needed for
757757
decompressing the frame. ``0`` means the dictionary ID was not
758758
recorded in the frame header. This may mean that a Zstandard dictionary
759759
is not needed, or that the ID of a required dictionary was not recorded.

0 commit comments

Comments
 (0)