-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathbinascii.po
More file actions
279 lines (242 loc) · 13.6 KB
/
binascii.po
File metadata and controls
279 lines (242 loc) · 13.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-03 16:35+0000\n"
"PO-Revision-Date: 2025-09-22 17:54+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/binascii.rst:2
msgid ":mod:`binascii` --- Convert between binary and ASCII"
msgstr ":mod:`binascii` --- 二进制和 ASCII 码互转 "
#: ../../library/binascii.rst:15
msgid ""
"The :mod:`binascii` module contains a number of methods to convert between "
"binary and various ASCII-encoded binary representations. Normally, you will "
"not use these functions directly but use wrapper modules like :mod:`uu`, "
":mod:`base64`, or :mod:`binhex` instead. The :mod:`binascii` module contains"
" low-level functions written in C for greater speed that are used by the "
"higher-level modules."
msgstr ""
":mod:`binascii` 模块包含很多在二进制和二进制表示的各种ASCII码之间转换的方法。 通常情况不会直接使用这些函数,而是使用像 "
":mod:`uu` , :mod:`base64` ,或 :mod:`binhex` 这样的封装模块。 为了执行效率高,:mod:`binascii` "
"模块含有许多用 C 写的低级函数,这些底层函数被一些高级模块所使用。"
#: ../../library/binascii.rst:24
msgid ""
"``a2b_*`` functions accept Unicode strings containing only ASCII characters."
" Other functions only accept :term:`bytes-like objects <bytes-like object>` "
"(such as :class:`bytes`, :class:`bytearray` and other objects that support "
"the buffer protocol)."
msgstr ""
"``a2b_*`` 函数接受只含有 ASCII 码的Unicode 字符串。其他函数只接受 :term:`字节类对象 <bytes-like "
"object>` (例如 :class:`bytes`,:class:`bytearray` 和其他支持缓冲区协议的对象)。"
#: ../../library/binascii.rst:29
msgid ""
"ASCII-only unicode strings are now accepted by the ``a2b_*`` functions."
msgstr " ``a2b_*`` 函数支持只包含 ASCII 的 Unicode 字符串。"
#: ../../library/binascii.rst:33
msgid "The :mod:`binascii` module defines the following functions:"
msgstr ":mod:`binascii` 模块定义了以下函数:"
#: ../../library/binascii.rst:38
msgid ""
"Convert a single line of uuencoded data back to binary and return the binary"
" data. Lines normally contain 45 (binary) bytes, except for the last line. "
"Line data may be followed by whitespace."
msgstr "将单行 uu 编码数据转换成二进制数据并返回。uu 编码每行的数据通常包含45 个(二进制)字节,最后一行除外。每行数据后面可能跟有空格。"
#: ../../library/binascii.rst:45
msgid ""
"Convert binary data to a line of ASCII characters, the return value is the "
"converted line, including a newline char. The length of *data* should be at "
"most 45. If *backtick* is true, zeros are represented by ``'`'`` instead of "
"spaces."
msgstr ""
"将二进制数据转换为 ASCII 编码字符,返回值是转换后的行数据,包括换行符。 *data* 的长度最多为45。如果 *backtick* "
"为ture,则零由 ``'`'`` 而不是空格表示。"
#: ../../library/binascii.rst:49
msgid "Added the *backtick* parameter."
msgstr "增加 *backtick* 形参。"
#: ../../library/binascii.rst:55
msgid ""
"Convert a block of base64 data back to binary and return the binary data. "
"More than one line may be passed at a time."
msgstr "将 base64 数据块转换成二进制并以二进制数据形式返回。一次可以传递多行数据。"
#: ../../library/binascii.rst:61
msgid ""
"Convert binary data to a line of ASCII characters in base64 coding. The "
"return value is the converted line, including a newline char if *newline* is"
" true. The output of this function conforms to :rfc:`3548`."
msgstr ""
"将二进制数据转换为一行用 base64 编码的ASCII字符串。返回值是转换后的行数据,如果 *newline* "
"为true,则返回值包括换行符。该函数的输出符合:rfc:`3548`。"
#: ../../library/binascii.rst:65
msgid "Added the *newline* parameter."
msgstr "增加 *newline* 形参。"
#: ../../library/binascii.rst:71
msgid ""
"Convert a block of quoted-printable data back to binary and return the "
"binary data. More than one line may be passed at a time. If the optional "
"argument *header* is present and true, underscores will be decoded as "
"spaces."
msgstr ""
"将一个引号可打印的数据块转换成二进制数据并返回。一次可以转换多行。如果可选参数 *header* 存在且为true,则数据中的下划线将被解码成空格。"
#: ../../library/binascii.rst:78
msgid ""
"Convert binary data to a line(s) of ASCII characters in quoted-printable "
"encoding. The return value is the converted line(s). If the optional "
"argument *quotetabs* is present and true, all tabs and spaces will be "
"encoded. If the optional argument *istext* is present and true, newlines "
"are not encoded but trailing whitespace will be encoded. If the optional "
"argument *header* is present and true, spaces will be encoded as underscores"
" per :rfc:`1522`. If the optional argument *header* is present and false, "
"newline characters will be encoded as well; otherwise linefeed conversion "
"might corrupt the binary data stream."
msgstr ""
"将二进制数据转换为一行或多行带引号可打印编码的ASCII字符串。返回值是转换后的行数据。如果可选参数 *quotetabs* "
"存在且为真值,则对所有制表符和空格进行编码。如果可选参数 *istext* 存在且为真值,则不对新行进行编码,但将对尾随空格进行编码。如果可选参数 "
"*header* 存在且为true,则空格将被编码为下划线 :rfc:`1522`。如果可选参数 *header* "
"存在且为假值,则也会对换行符进行编码;不进行换行转换编码可能会破坏二进制数据流。"
#: ../../library/binascii.rst:91
msgid ""
"Convert binhex4 formatted ASCII data to binary, without doing RLE-"
"decompression. The string should contain a complete number of binary bytes, "
"or (in case of the last portion of the binhex4 data) have the remaining bits"
" zero."
msgstr ""
"将 binhex4 格式的 ASCII 数据不进行 RLE 解压缩直接转换为二进制数据。该字符串应包含完整数量的二进制字节,或者(在binhex4 "
"数据最后部分)剩余位为零。"
#: ../../library/binascii.rst:100
msgid ""
"Perform RLE-decompression on the data, as per the binhex4 standard. The "
"algorithm uses ``0x90`` after a byte as a repeat indicator, followed by a "
"count. A count of ``0`` specifies a byte value of ``0x90``. The routine "
"returns the decompressed data, unless data input data ends in an orphaned "
"repeat indicator, in which case the :exc:`Incomplete` exception is raised."
msgstr ""
"根据 binhex4 标准对数据执行 RLE 解压缩。该算法在一个字节的数据后使用 ``0x90`` 作为重复指示符,然后计数。计数 ``0`` "
"指定字节值 ``0x90`` 。该例程返回解压缩的数据,输入数据以孤立的重复指示符结束的情况下,将引发 :exc:`Incomplete` 异常。"
#: ../../library/binascii.rst:106
msgid "Accept only bytestring or bytearray objects as input."
msgstr "仅接受 bytestring 或 bytearray 对象作为输入。"
#: ../../library/binascii.rst:114
msgid "Perform binhex4 style RLE-compression on *data* and return the result."
msgstr "在 *data* 上执行 binhex4 游程编码压缩并返回结果。"
#: ../../library/binascii.rst:121
msgid ""
"Perform hexbin4 binary-to-ASCII translation and return the resulting string."
" The argument should already be RLE-coded, and have a length divisible by 3 "
"(except possibly the last fragment)."
msgstr ""
"执行 hexbin4 类型二进制到 ASCII 码的转换并返回结果字符串。输入数据应经过 RLE 编码,且数据长度可被3整除(除了最后一个片段)。"
#: ../../library/binascii.rst:130
msgid ""
"Compute a 16-bit CRC value of *data*, starting with *value* as the initial "
"CRC, and return the result. This uses the CRC-CCITT polynomial *x*:sup:`16`"
" + *x*:sup:`12` + *x*:sup:`5` + 1, often represented as 0x1021. This CRC is"
" used in the binhex4 format."
msgstr ""
"以 *value* 作为初始 CRC 计算 *data* 的16位 CRC 值,返回其结果。这里使用 CRC-CCITT 生成多项式 "
"*x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1 ,通常表示为0x1021。该 CRC 被用于 binhex4"
" 格式。"
#: ../../library/binascii.rst:138
msgid ""
"Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an "
"initial CRC of *value*. The default initial CRC is zero. The algorithm is "
"consistent with the ZIP file checksum. Since the algorithm is designed for "
"use as a checksum algorithm, it is not suitable for use as a general hash "
"algorithm. Use as follows::"
msgstr ""
"计算 CRC-32,即 *data* 的无符号 32 位校验和,初始 CRC 值为 *value*。 默认的初始 CRC 值为零。 该算法与 ZIP "
"文件校验和算法一致。 由于该算法被设计用作校验和算法,因此不适合用作通用哈希算法。 使用方式如下::"
#: ../../library/binascii.rst:150
msgid ""
"The result is always unsigned. To generate the same numeric value when using"
" Python 2 or earlier, use ``crc32(data) & 0xffffffff``."
msgstr ""
"结果值将始终为无符号类型。 要在使用 Python 2 或更早版本时生成同样的数值,请使用 ``crc32(data) & 0xffffffff``。"
#: ../../library/binascii.rst:158
msgid ""
"Return the hexadecimal representation of the binary *data*. Every byte of "
"*data* is converted into the corresponding 2-digit hex representation. The "
"returned bytes object is therefore twice as long as the length of *data*."
msgstr ""
"返回二进制数据 *data* 的十六进制表示形式。 *data* 的每个字节都被转换为相应的2位十六进制表示形式。因此返回的字节对象的长度是 "
"*data* 的两倍。"
#: ../../library/binascii.rst:162
msgid ""
"Similar functionality (but returning a text string) is also conveniently "
"accessible using the :meth:`bytes.hex` method."
msgstr "使用::meth:`bytes.hex` 方法也可以方便地实现相似的功能(但仅返回文本字符串)。"
#: ../../library/binascii.rst:165
msgid ""
"If *sep* is specified, it must be a single character str or bytes object. It"
" will be inserted in the output after every *bytes_per_sep* input bytes. "
"Separator placement is counted from the right end of the output by default, "
"if you wish to count from the left, supply a negative *bytes_per_sep* value."
msgstr ""
"如果指定了 *sep*,它必须为单字符 str 或 bytes 对象。 它将被插入每个 *bytes_per_sep* 输入字节之后。 "
"分隔符位置默认从输出的右端开始计数,如果你希望从左端开始计数,请提供一个负的 *bytes_per_sep* 值。"
#: ../../library/binascii.rst:180
msgid "The *sep* and *bytes_per_sep* parameters were added."
msgstr "添加了 *sep* 和 *bytes_per_sep* 形参。"
#: ../../library/binascii.rst:186
msgid ""
"Return the binary data represented by the hexadecimal string *hexstr*. This"
" function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even "
"number of hexadecimal digits (which can be upper or lower case), otherwise "
"an :exc:`Error` exception is raised."
msgstr ""
"返回由十六进制字符串 *hexstr* 表示的二进制数据。此函数功能与 :func:`b2a_hex` 相反。 *hexstr* "
"必须包含偶数个十六进制数字(可以是大写或小写),否则会引发 :exc:`Error` 异常。"
#: ../../library/binascii.rst:191
msgid ""
"Similar functionality (accepting only text string arguments, but more "
"liberal towards whitespace) is also accessible using the "
":meth:`bytes.fromhex` class method."
msgstr "使用::meth:`bytes.fromhex` 类方法也实现相似的功能(仅接受文本字符串参数,不限制其中的空白字符)。"
#: ../../library/binascii.rst:197
msgid "Exception raised on errors. These are usually programming errors."
msgstr "通常是因为编程错误引发的异常。"
#: ../../library/binascii.rst:202
msgid ""
"Exception raised on incomplete data. These are usually not programming "
"errors, but may be handled by reading a little more data and trying again."
msgstr "数据不完整引发的异常。通常不是编程错误导致的,可以通过读取更多的数据并再次尝试来处理该异常。"
#: ../../library/binascii.rst:210
msgid "Module :mod:`base64`"
msgstr "模块 :mod:`base64`"
#: ../../library/binascii.rst:209
msgid ""
"Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85."
msgstr "支持在16,32,64,85进制中进行符合 RFC 协议的 base64 样式编码。"
#: ../../library/binascii.rst:213
msgid "Module :mod:`binhex`"
msgstr "模块 :mod:`binhex`"
#: ../../library/binascii.rst:213
msgid "Support for the binhex format used on the Macintosh."
msgstr "支持在 Macintosh 上使用的 binhex 格式。"
#: ../../library/binascii.rst:216
msgid "Module :mod:`uu`"
msgstr "模块 :mod:`uu`"
#: ../../library/binascii.rst:216
msgid "Support for UU encoding used on Unix."
msgstr "支持 Unix 使用的 UU 编码。"
#: ../../library/binascii.rst:218
msgid "Module :mod:`quopri`"
msgstr "模块 :mod:`quopri`"
#: ../../library/binascii.rst:219
msgid "Support for quoted-printable encoding used in MIME email messages."
msgstr "支持在 MIME 版本电子邮件中使用引号可打印编码。"