Skip to content

Commit f59718e

Browse files
committed
Correct doc about handling of unknown size and fix refs
1 parent d4b3229 commit f59718e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Doc/library/compression.zstd.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,18 @@ Compressing and decompressing data in memory
253253
the next frame. *size* will be written into the frame header of the next
254254
frame unless :attr:`CompressionParameter.content_size_flag` is ``False``
255255
or ``0``. A size of ``0`` means that the frame is empty. If *size* is
256-
``None``, the frame header will record the size as unknown.
256+
``None``, the frame header will omit the frame size.
257257

258-
If :attr:`~.last_mode` is not :attr:`~.FLUSH_FRAME`, a
258+
If :attr:`last_mode` is not :attr:`FLUSH_FRAME`, a
259259
:exc:`RuntimeError` is raised as the compressor is not at the start of
260260
a frame. If the pledged size does not match the actual size of data
261261
provided to :meth:`~.compress`, future calls to :meth:`~.compress` or
262-
:meth:`~.flush` may raise :exc:`ZstdError` and the last chunk of data may
262+
:meth:`flush` may raise :exc:`ZstdError` and the last chunk of data may
263263
be lost.
264264

265-
After :meth:`~.flush` or :meth:`~.compress` are called with mode
266-
:attr:`~.FLUSH_FRAME`, the next frame will default to have an unknown
267-
size unless :meth:`!set_pledged_input_size` is called again.
265+
After :meth:`flush` or :meth:`~.compress` are called with mode
266+
:attr:`FLUSH_FRAME`, the next frame will not include the frame size into
267+
the header unless :meth:`!set_pledged_input_size` is called again.
268268

269269
.. attribute:: CONTINUE
270270

0 commit comments

Comments
 (0)