1414--------------
1515
1616This module provides functions for encoding binary data to printable
17- ASCII characters and decoding such encodings back to binary data,
18- such as :ref: `those specified in RFC 4648 <base_64_rfc_4648 >` and
19- :ref: `Base85 encodings <base_64_base_85 >`.
17+ ASCII characters and decoding such encodings back to binary data.
18+ This includes the :ref: `encodings specified in <base64-rfc-4648 >`
19+ :rfc: `4648 ` (Base64, Base32 and Base16)
20+ and the non-standard :ref: `Base85 encodings <base64-base-85 >`.
2021
2122There are two interfaces provided by this module. The modern interface
2223supports encoding :term: `bytes-like objects <bytes-like object> ` to ASCII
2324:class: `bytes `, and decoding :term: `bytes-like objects <bytes-like object> ` or
2425strings containing ASCII to :class: `bytes `. Both base-64 alphabets
2526defined in :rfc: `4648 ` (normal, and URL- and filesystem-safe) are supported.
2627
27- The :ref: `legacy interface <base_64_legacy >` does not support decoding from strings, but it does
28+ The :ref: `legacy interface <base-64-legacy >` does not support decoding from strings, but it does
2829provide functions for encoding and decoding to and from :term: `file objects
2930<file object> `. It only supports the Base64 standard alphabet, and it adds
3031newlines every 76 characters as per :rfc: `2045 `. Note that if you are looking
@@ -41,15 +42,14 @@ package instead.
4142 encoding and decoding functions in this module. Ascii85/Base85 support added.
4243
4344
44- .. _ base_64_rfc_4648 :
45+ .. _ base64-rfc-4648 :
4546
4647RFC 4648 Encodings
4748------------------
4849
4950The :rfc: `4648 ` encodings are suitable for encoding binary data so that it can be
5051safely sent by email, used as parts of URLs, or included as part of an HTTP
51- POST request. The encoding algorithm is not the same as the
52- :program: `uuencode ` program.
52+ POST request.
5353
5454.. function :: b64encode(s, altchars=None)
5555
@@ -184,17 +184,17 @@ POST request. The encoding algorithm is not the same as the
184184 incorrectly padded or if there are non-alphabet characters present in the
185185 input.
186186
187- .. _ base_64_base_85 :
187+ .. _ base64-base-85 :
188188
189189Base85 Encodings
190190-----------------
191191
192- Base85 encoding is not formally specified. Base85 encoding is a de facto standard,
193- and different systems perform the encoding differently.
192+ Base85 encoding is not formally specified but rather a de facto standard,
193+ thus different systems perform the encoding differently.
194194
195195The :func: `a85encode ` and :func: `b85encode ` functions in this module are two implementations of
196- the de facto standard. Which function you should use depends on how the other
197- software you use implements the Base85 encoding .
196+ the de facto standard. You should call the function with the Base85
197+ implementation used by the software you intend to work with .
198198
199199The two functions present in this module differ in how they handle the following:
200200
@@ -285,7 +285,7 @@ Refer to the documentation of the individual functions for more information.
285285 .. versionadded :: 3.13
286286
287287
288- .. _ base_64_legacy :
288+ .. _ base64-legacy :
289289
290290Legacy Interface
291291----------------
0 commit comments