Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16671)

Delta Between Two Patch Sets: Doc/library/codecs.rst

Issue 17839: base64 module should use memoryview
Left Patch Set: Created 6 years, 4 months ago
Right Patch Set: Created 6 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Doc/library/base64.rst ('k') | Lib/base64.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 :mod:`codecs` --- Codec registry and base classes 1 :mod:`codecs` --- Codec registry and base classes
2 ================================================= 2 =================================================
3 3
4 .. module:: codecs 4 .. module:: codecs
5 :synopsis: Encode and decode data and streams. 5 :synopsis: Encode and decode data and streams.
6 .. moduleauthor:: Marc-André Lemburg <mal@lemburg.com> 6 .. moduleauthor:: Marc-André Lemburg <mal@lemburg.com>
7 .. sectionauthor:: Marc-André Lemburg <mal@lemburg.com> 7 .. sectionauthor:: Marc-André Lemburg <mal@lemburg.com>
8 .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> 8 .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
9 9
10 10
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 | | | | 1197 | | | |
1198 | | | .. deprecated:: 3.3 | 1198 | | | .. deprecated:: 3.3 |
1199 +--------------------+---------+---------------------------+ 1199 +--------------------+---------+---------------------------+
1200 1200
1201 The following codecs provide :term:`bytes-like object` to :class:`bytes` 1201 The following codecs provide :term:`bytes-like object` to :class:`bytes`
1202 mappings. 1202 mappings.
1203 1203
1204 1204
1205 .. tabularcolumns:: |l|L|L| 1205 .. tabularcolumns:: |l|L|L|
1206 1206
1207 +----------------------+---------------------------+---------------------------- --+ 1207 +----------------------+------------------------------+------------------------- -----+
1208 | Codec | Purpose | Encoder/decoder | 1208 | Codec | Purpose | Encoder / decoder |
1209 +======================+===========================+============================ ==+ 1209 +======================+==============================+========================= =====+
1210 | base64_codec [#b64]_ | Convert operand to MIME | :meth:`base64.b64encode`, | 1210 | base64_codec [#b64]_ | Convert operand to MIME | :meth:`base64.b64encode` / |
1211 | | base64 (the result always | :meth:`base64.b64decode` | 1211 | | base64 (the result always | :meth:`base64.b64decode` |
1212 | | includes a trailing | | 1212 | | includes a trailing | |
1213 | | ``'\n'``) | | 1213 | | ``'\n'``) | |
1214 +----------------------+---------------------------+---------------------------- --+ 1214 | | | |
1215 | bz2_codec | Compress the operand | :meth:`bz2.compress`, | 1215 | | .. versionchanged:: 3.4 | |
1216 | | using bz2 | :meth:`bz2.decompress` | 1216 | | accepts any | |
1217 +----------------------+---------------------------+---------------------------- --+ 1217 | | :term:`bytes-like object` | |
1218 | hex_codec | Convert operand to | :meth:`base64.b16encode`, | 1218 | | as input for encoding and | |
1219 | | hexadecimal | :meth:`base64.b16decode` | 1219 | | decoding | |
1220 | | representation, with two | | 1220 +----------------------+------------------------------+------------------------- -----+
1221 | | digits per byte | | 1221 | bz2_codec | Compress the operand | :meth:`bz2.compress` / |
1222 +----------------------+---------------------------+---------------------------- --+ 1222 | | using bz2 | :meth:`bz2.decompress` |
1223 | quopri_codec | Convert operand to MIME | :meth:`quopri.encodestring` , | 1223 +----------------------+------------------------------+------------------------- -----+
1224 | | quoted printable | :meth:`quopri.decodestring` | 1224 | hex_codec | Convert operand to | :meth:`base64.b16encode` / |
1225 +----------------------+---------------------------+---------------------------- --+ 1225 | | hexadecimal | :meth:`base64.b16decode` |
1226 | uu_codec | Convert the operand using | :meth:`uu.encode`, | 1226 | | representation, with two | |
1227 | | uuencode | :meth:`uu.decode` | 1227 | | digits per byte | |
1228 +----------------------+---------------------------+---------------------------- --+ 1228 +----------------------+------------------------------+------------------------- -----+
1229 | zlib_codec | Compress the operand | :meth:`zlib.compress`, | 1229 | quopri_codec | Convert operand to MIME | :meth:`quopri.encodestri ng` /|
1230 | | using gzip | :meth:`zlib.decompress` | 1230 | | quoted printable | :meth:`quopri.decodestri ng` |
1231 +----------------------+---------------------------+---------------------------- --+ 1231 +----------------------+------------------------------+------------------------- -----+
1232 1232 | uu_codec | Convert the operand using | :meth:`uu.encode` / |
1233 .. [#b64] Rather than accepting any :term:`bytes-like object`, 1233 | | uuencode | :meth:`uu.decode` |
1234 ``'base64_codec'`` accepts only :class:`bytes` and :class:`bytearray` for 1234 +----------------------+------------------------------+------------------------- -----+
1235 encoding and only :class:`bytes`, :class:`bytearray`, and ASCII-only 1235 | zlib_codec | Compress the operand | :meth:`zlib.compress` / |
1236 instances of :class:`str` for decoding 1236 | | using gzip | :meth:`zlib.decompress` |
1237 +----------------------+------------------------------+------------------------- -----+
1238
1239 .. [#b64] In addition to :term:`bytes-like objects <bytes-like object>`,
1240 ``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for
1241 decoding
1237 1242
1238 1243
1239 The following codecs provide :class:`str` to :class:`str` mappings. 1244 The following codecs provide :class:`str` to :class:`str` mappings.
1240 1245
1241 .. tabularcolumns:: |l|L| 1246 .. tabularcolumns:: |l|L|
1242 1247
1243 +--------------------+---------------------------+ 1248 +--------------------+---------------------------+
1244 | Codec | Purpose | 1249 | Codec | Purpose |
1245 +====================+===========================+ 1250 +====================+===========================+
1246 | rot_13 | Returns the Caesar-cypher | 1251 | rot_13 | Returns the Caesar-cypher |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 1344
1340 .. module:: encodings.utf_8_sig 1345 .. module:: encodings.utf_8_sig
1341 :synopsis: UTF-8 codec with BOM signature 1346 :synopsis: UTF-8 codec with BOM signature
1342 .. moduleauthor:: Walter Dörwald 1347 .. moduleauthor:: Walter Dörwald
1343 1348
1344 This module implements a variant of the UTF-8 codec: On encoding a UTF-8 encoded 1349 This module implements a variant of the UTF-8 codec: On encoding a UTF-8 encoded
1345 BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this 1350 BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this
1346 is only done once (on the first write to the byte stream). For decoding an 1351 is only done once (on the first write to the byte stream). For decoding an
1347 optional UTF-8 encoded BOM at the start of the data will be skipped. 1352 optional UTF-8 encoded BOM at the start of the data will be skipped.
1348 1353
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+