Skip to content

Commit e36d31d

Browse files
committed
fix(docs): clarify pad for z85encode
1 parent e490bd9 commit e36d31d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Doc/library/base64.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ POST request.
220220
Base85 Encodings
221221
-----------------
222222

223-
Base85 encoding is a family of algorithms which represent four input
224-
bytes using five ASCII characters. Originally implemented in the Unix
223+
Base85 encoding is a family of algorithms which represent four bytes
224+
using five ASCII characters. Originally implemented in the Unix
225225
``btoa(1)`` utility, a version of it was later adopted by Adobe in the
226-
PostScript language and is standardized as ISO 32000-2:2020 (PDF 2.0),
227-
section 7.4.3. This version, in both its ``btoa`` and PDF variants,
228-
is implemented by :func:`a85encode`.
226+
PostScript language and is standardized as ISO 32000-2:2020 (PDF 2.0).
227+
This version, in both its ``btoa`` and PDF variants, is implemented by
228+
:func:`a85encode`.
229229

230230
A separate version, using a different output character set, was
231231
defined as an April Fool's joke in :rfc:`1924` but is now used by Git
@@ -320,8 +320,10 @@ Refer to the documentation of the individual functions for more information.
320320
Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ)
321321
and return the encoded :class:`bytes`.
322322

323-
If *pad* is true, the input is padded with ``b'\0'`` so its length is a
324-
multiple of 4 bytes before encoding.
323+
The input is padded with ``b'\0'`` so its length is a multiple of 4
324+
bytes before encoding. If *pad* is true, all the resulting
325+
characters are retained in the output, which will then be a
326+
multiple of 5 bytes, as required by the ZeroMQ standard.
325327

326328
.. versionadded:: 3.13
327329

0 commit comments

Comments
 (0)