-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathgzip.po
394 lines (338 loc) · 17.3 KB
/
gzip.po
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# sgqy <[email protected]>, 2020
# 汪心禾 <[email protected]>, 2020
# 1lin24 <[email protected]>, 2020
# Freesand Leo <[email protected]>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 16:06+0000\n"
"PO-Revision-Date: 2020-05-30 12:03+0000\n"
"Last-Translator: Freesand Leo <[email protected]>, 2022\n"
"Language-Team: Chinese (China) (https://www.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/gzip.rst:2
msgid ":mod:`gzip` --- Support for :program:`gzip` files"
msgstr ":mod:`gzip` --- 对 :program:`gzip` 格式的支持"
#: ../../library/gzip.rst:7
msgid "**Source code:** :source:`Lib/gzip.py`"
msgstr "**源代码:** :source:`Lib/gzip.py`"
#: ../../library/gzip.rst:11
msgid ""
"This module provides a simple interface to compress and decompress files "
"just like the GNU programs :program:`gzip` and :program:`gunzip` would."
msgstr ""
"此模块提供的简单接口帮助用户压缩和解压缩文件,功能类似于 GNU 应用程序 :program:`gzip` 和 :program:`gunzip`。"
#: ../../library/gzip.rst:14
msgid "The data compression is provided by the :mod:`zlib` module."
msgstr "数据压缩由 :mod:`zlib` 模块提供。"
#: ../../library/gzip.rst:16
msgid ""
"The :mod:`gzip` module provides the :class:`GzipFile` class, as well as the "
":func:`.open`, :func:`compress` and :func:`decompress` convenience "
"functions. The :class:`GzipFile` class reads and writes :program:`gzip`\\ "
"-format files, automatically compressing or decompressing the data so that "
"it looks like an ordinary :term:`file object`."
msgstr ""
":mod:`gzip` 模块提供 :class:`GzipFile` 类和 "
":func:`.open`、:func:`compress`、:func:`decompress` 几个便利的函数。:class:`GzipFile` "
"类可以读写 :program:`gzip` 格式的文件,还能自动压缩和解压缩数据,这让操作压缩文件如同操作普通的 :term:`file object`"
" 一样方便。"
#: ../../library/gzip.rst:22
msgid ""
"Note that additional file formats which can be decompressed by the "
":program:`gzip` and :program:`gunzip` programs, such as those produced by "
":program:`compress` and :program:`pack`, are not supported by this module."
msgstr ""
"注意,此模块不支持部分可以被 :program:`gzip` 和 :program:`gunzip` 解压的格式,如利用 "
":program:`compress` 或 :program:`pack` 压缩所得的文件。"
#: ../../library/gzip.rst:26
msgid "The module defines the following items:"
msgstr "这个模块定义了以下内容:"
#: ../../library/gzip.rst:31
msgid ""
"Open a gzip-compressed file in binary or text mode, returning a :term:`file "
"object`."
msgstr "以二进制方式或者文本方式打开一个 gzip 格式的压缩文件,返回一个 :term:`file object`。"
#: ../../library/gzip.rst:34
msgid ""
"The *filename* argument can be an actual filename (a :class:`str` or "
":class:`bytes` object), or an existing file object to read from or write to."
msgstr ""
"*filename* 参数可以是一个实际的文件名(一个 :class:`str` 对象或者 :class:`bytes` "
"对象),或者是一个用来读写的已存在的文件对象。"
#: ../../library/gzip.rst:37
msgid ""
"The *mode* argument can be any of ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, "
"``'w'``, ``'wb'``, ``'x'`` or ``'xb'`` for binary mode, or ``'rt'``, "
"``'at'``, ``'wt'``, or ``'xt'`` for text mode. The default is ``'rb'``."
msgstr ""
"*mode* 参数可以是二进制模式: ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, ``'w'``, ``'wb'``, "
"``'x'`` or ``'xb'`` , 或者是文本模式 ``'rt'``, ``'at'``, ``'wt'``, or ``'xt'``。默认值是"
" ``'rb'``。"
#: ../../library/gzip.rst:41
msgid ""
"The *compresslevel* argument is an integer from 0 to 9, as for the "
":class:`GzipFile` constructor."
msgstr " *compresslevel* 参数是一个用于 :class:`GzipFile` 构造器的从 0 到 9 的整数。"
#: ../../library/gzip.rst:44
msgid ""
"For binary mode, this function is equivalent to the :class:`GzipFile` "
"constructor: ``GzipFile(filename, mode, compresslevel)``. In this case, the "
"*encoding*, *errors* and *newline* arguments must not be provided."
msgstr ""
"对于二进制模式,这个函数等价于 :class:`GzipFile` 构造器:``GzipFile(filename, mode, "
"compresslevel)``。在这个例子中,*encoding*, *errors* 和 *newline* 三个参数一定不要设置。"
#: ../../library/gzip.rst:48
msgid ""
"For text mode, a :class:`GzipFile` object is created, and wrapped in an "
":class:`io.TextIOWrapper` instance with the specified encoding, error "
"handling behavior, and line ending(s)."
msgstr ""
"对于文本模式,将会创建一个 :class:`GzipFile` 对象,并将它封装到一个 :class:`io.TextIOWrapper` 实例中, "
"这个实例默认了指定编码,错误抓获行为和行。"
#: ../../library/gzip.rst:52
msgid ""
"Added support for *filename* being a file object, support for text mode, and"
" the *encoding*, *errors* and *newline* arguments."
msgstr "支持 *filename* 为一个文件对象,支持文本模式和 *encoding*, *errors* 和 *newline* 参数。"
#: ../../library/gzip.rst:56
msgid "Added support for the ``'x'``, ``'xb'`` and ``'xt'`` modes."
msgstr "支持 ``'x'``, ``'xb'`` 和``'xt'`` 三种模式。"
#: ../../library/gzip.rst:59 ../../library/gzip.rst:164
msgid "Accepts a :term:`path-like object`."
msgstr "接受一个 :term:`path-like object`。"
#: ../../library/gzip.rst:64
msgid ""
"An exception raised for invalid gzip files. It inherits :exc:`OSError`. "
":exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip "
"files."
msgstr ""
"针对无效 gzip 文件引发的异常。 它继承自 :exc:`OSError`。 针对无效 gzip 文件也可能引发 :exc:`EOFError` 和 "
":exc:`zlib.error`。"
#: ../../library/gzip.rst:72
msgid ""
"Constructor for the :class:`GzipFile` class, which simulates most of the "
"methods of a :term:`file object`, with the exception of the :meth:`truncate`"
" method. At least one of *fileobj* and *filename* must be given a non-"
"trivial value."
msgstr ""
":class:`GzipFile` 类的构造器支持 :meth:`truncate` 的异常,与 :term:`file object` "
"的大多数方法非常相似。*fileobj* 和 *filename* 至少有一个不为空。"
#: ../../library/gzip.rst:77
msgid ""
"The new class instance is based on *fileobj*, which can be a regular file, "
"an :class:`io.BytesIO` object, or any other object which simulates a file. "
"It defaults to ``None``, in which case *filename* is opened to provide a "
"file object."
msgstr ""
"新的实例基于 *fileobj*,它可以是一个普通文件,一个 :class:`io.BytesIO` 对象,或者任何一个与文件相似的对象。当 "
"*filename* 是一个文件对象时,它的默认值是 ``None``。"
#: ../../library/gzip.rst:82
msgid ""
"When *fileobj* is not ``None``, the *filename* argument is only used to be "
"included in the :program:`gzip` file header, which may include the original "
"filename of the uncompressed file. It defaults to the filename of "
"*fileobj*, if discernible; otherwise, it defaults to the empty string, and "
"in this case the original filename is not included in the header."
msgstr ""
"当 *fileobj* 为 ``None`` 时, *filename* 参数只用于 :program:`gzip` "
"文件头中,这个文件有可能包含未压缩文件的源文件名。如果文件可以被识别,默认 *fileobj* "
"的文件名;否则默认为空字符串,在这种情况下文件头将不包含源文件名。"
#: ../../library/gzip.rst:88
msgid ""
"The *mode* argument can be any of ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, "
"``'w'``, ``'wb'``, ``'x'``, or ``'xb'``, depending on whether the file will "
"be read or written. The default is the mode of *fileobj* if discernible; "
"otherwise, the default is ``'rb'``."
msgstr ""
"*mode* 可以是``'r'``, ``'rb'``, ``'a'``, ``'ab'``, ``'w'``, ``'wb'``, ``'x'``, "
"或者 ``'xb'``,选择哪个取决于是读文件还是写文件。如果可以分辨是,默认的模式是 *fileobj*,否则为 ``'rb'``。"
#: ../../library/gzip.rst:93
msgid ""
"Note that the file is always opened in binary mode. To open a compressed "
"file in text mode, use :func:`.open` (or wrap your :class:`GzipFile` with an"
" :class:`io.TextIOWrapper`)."
msgstr ""
"需要注意的是,文件默认使用二进制模式打开。 如果要以文本模式打开一个压缩文件,请使用 :func:`.open` 方法 (或者使用 "
":class:`io.TextIOWrapper` 包装 :class:`GzipFile`)。"
#: ../../library/gzip.rst:97
msgid ""
"The *compresslevel* argument is an integer from ``0`` to ``9`` controlling "
"the level of compression; ``1`` is fastest and produces the least "
"compression, and ``9`` is slowest and produces the most compression. ``0`` "
"is no compression. The default is ``9``."
msgstr ""
"*compresslevel* 参数是一个从 ``0`` 到 ``9`` 的整数,用于控制压缩等级;``1`` 最快但压缩比例最小,``9`` "
"最慢但压缩比例最大。 ``0`` 不压缩。默认为 ``9``。"
#: ../../library/gzip.rst:102
msgid ""
"The *mtime* argument is an optional numeric timestamp to be written to the "
"last modification time field in the stream when compressing. It should only"
" be provided in compression mode. If omitted or ``None``, the current time "
"is used. See the :attr:`mtime` attribute for more details."
msgstr ""
"*mtime* 参数是一个可选的数字时间戳用于写入流的最后修改字段,。*mtime* 只在压缩模式中使用。如果省略或者值为 "
"``None``,则使用当前时间。更多细节,详见 :attr:`mtime` 属性。"
#: ../../library/gzip.rst:107
msgid ""
"Calling a :class:`GzipFile` object's :meth:`close` method does not close "
"*fileobj*, since you might wish to append more material after the compressed"
" data. This also allows you to pass an :class:`io.BytesIO` object opened "
"for writing as *fileobj*, and retrieve the resulting memory buffer using the"
" :class:`io.BytesIO` object's :meth:`~io.BytesIO.getvalue` method."
msgstr ""
"调用 :class:`GzipFile` 的 :meth:`close` 方法不会关闭 "
"*fileobj*,因为你可以希望增加其它内容到已经压缩的数中。你可以将一个 :class:`io.BytesIO` 对象作为 "
"*fileobj*,也可以使用 :class:`io.BytesIO` 的 :meth:`~io.BytesIO.getvalue` "
"方法从内存缓存中恢复数据。"
#: ../../library/gzip.rst:113
msgid ""
":class:`GzipFile` supports the :class:`io.BufferedIOBase` interface, "
"including iteration and the :keyword:`with` statement. Only the "
":meth:`truncate` method isn't implemented."
msgstr ""
":class:`GzipFile` 支持 :class:`io.BufferedIOBase` 类的接口, 包括迭代和 :keyword:`with` "
"语句。只有 :meth:`truncate` 方法没有实现。"
#: ../../library/gzip.rst:117
msgid ":class:`GzipFile` also provides the following method and attribute:"
msgstr ":class:`GzipFile` 还提供了以下的方法和属性:"
#: ../../library/gzip.rst:121
msgid ""
"Read *n* uncompressed bytes without advancing the file position. At most one"
" single read on the compressed stream is done to satisfy the call. The "
"number of bytes returned may be more or less than requested."
msgstr "在不移动文件指针的情况下读取 *n* 个未压缩字节。最多只有一个单独的读取流来服务这个方法调用。返回的字节数不一定刚好等于要求的数量。"
#: ../../library/gzip.rst:126
msgid ""
"While calling :meth:`peek` does not change the file position of the "
":class:`GzipFile`, it may change the position of the underlying file object "
"(e.g. if the :class:`GzipFile` was constructed with the *fileobj* "
"parameter)."
msgstr ""
"调用 :meth:`peek` 并没有改变 :class:`GzipFile` 的文件指针,它可能改变潜在文件对象(例如: "
":class:`GzipFile` 使用 *fileobj* 参数进行初始化)。"
#: ../../library/gzip.rst:135
msgid ""
"When decompressing, the value of the last modification time field in the "
"most recently read header may be read from this attribute, as an integer. "
"The initial value before reading any headers is ``None``."
msgstr "在解压的过程中,最后修改时间字段的值可能来自于这个属性,以整数的形式出现。在读取任何文件头信息前,初始值为 ``None``。"
#: ../../library/gzip.rst:139
msgid ""
"All :program:`gzip` compressed streams are required to contain this "
"timestamp field. Some programs, such as :program:`gunzip`\\ , make use of "
"the timestamp. The format is the same as the return value of "
":func:`time.time` and the :attr:`~os.stat_result.st_mtime` attribute of the "
"object returned by :func:`os.stat`."
msgstr ""
"所有 :program:`gzip` 东方压缩流中必须包含时间戳这个字段。以便于像 :program:`gunzip`\\ "
"这样的程序可以使用时间戳。格式与 :func:`time.time` 的返回值和 :func:`os.stat` 对象的 "
":attr:`~os.stat_result.st_mtime` 属性值一样。"
#: ../../library/gzip.rst:145
msgid ""
"Support for the :keyword:`with` statement was added, along with the *mtime* "
"constructor argument and :attr:`mtime` attribute."
msgstr "支持 :keyword:`with` 语句,构造器参数 *mtime* 和 :attr:`mtime` 属性。"
#: ../../library/gzip.rst:149
msgid "Support for zero-padded and unseekable files was added."
msgstr "添加了对零填充和不可搜索文件的支持。"
#: ../../library/gzip.rst:152
msgid "The :meth:`io.BufferedIOBase.read1` method is now implemented."
msgstr "实现 :meth:`io.BufferedIOBase.read1` 方法。"
#: ../../library/gzip.rst:155
msgid "Added support for the ``'x'`` and ``'xb'`` modes."
msgstr "支持 ``'x'`` and ``'xb'`` 两种模式。"
#: ../../library/gzip.rst:158
msgid ""
"Added support for writing arbitrary :term:`bytes-like objects <bytes-like "
"object>`. The :meth:`~io.BufferedIOBase.read` method now accepts an argument"
" of ``None``."
msgstr ""
"支持写入任意 :term:`bytes-like objects <bytes-like "
"object>`。:meth:`~io.BufferedIOBase.read` 方法可以接受``None``为参数。"
#: ../../library/gzip.rst:170
msgid ""
"Compress the *data*, returning a :class:`bytes` object containing the "
"compressed data. *compresslevel* and *mtime* have the same meaning as in "
"the :class:`GzipFile` constructor above."
msgstr ""
"压缩 *data*,返回一个包含压缩数据的 :class:`bytes` 对象。 *compresslevel* 和 *mtime* 的含义与上文中 "
":class:`GzipFile` 构造器的相同。"
#: ../../library/gzip.rst:175
msgid "Added the *mtime* parameter for reproducible output."
msgstr "添加了 *mtime* 形参用于可重复的输出。"
#: ../../library/gzip.rst:180
msgid ""
"Decompress the *data*, returning a :class:`bytes` object containing the "
"uncompressed data."
msgstr "解压缩 *data*,返回一个包含未压缩数据的 :class:`bytes` 对象。"
#: ../../library/gzip.rst:189
msgid "Examples of usage"
msgstr "用法示例"
#: ../../library/gzip.rst:191
msgid "Example of how to read a compressed file::"
msgstr "读取压缩文件示例:"
#: ../../library/gzip.rst:197
msgid "Example of how to create a compressed GZIP file::"
msgstr "创建GZIP 文件示例:"
#: ../../library/gzip.rst:204
msgid "Example of how to GZIP compress an existing file::"
msgstr "使用 GZIP 压缩已有的文件示例:"
#: ../../library/gzip.rst:212
msgid "Example of how to GZIP compress a binary string::"
msgstr "使用 GZIP 压缩二进制字符串示例:"
#: ../../library/gzip.rst:221
msgid "Module :mod:`zlib`"
msgstr "模块 :mod:`zlib`"
#: ../../library/gzip.rst:221
msgid ""
"The basic data compression module needed to support the :program:`gzip` file"
" format."
msgstr "支持 :program:`gzip` 格式所需要的基本压缩模块。"
#: ../../library/gzip.rst:228
msgid "Command Line Interface"
msgstr "命令行界面"
#: ../../library/gzip.rst:230
msgid ""
"The :mod:`gzip` module provides a simple command line interface to compress "
"or decompress files."
msgstr ":mod:`gzip` 模块提供了简单的命令行界面用于压缩和解压缩文件。"
#: ../../library/gzip.rst:233
msgid "Once executed the :mod:`gzip` module keeps the input file(s)."
msgstr "在执行后 :mod:`gzip` 模块会保留输入文件。"
#: ../../library/gzip.rst:237
msgid ""
"Add a new command line interface with a usage. By default, when you will "
"execute the CLI, the default compression level is 6."
msgstr "添加一个带有用法说明的新命令行界面命令。 默认情况下,当你要执行 CLI 时,默认压缩等级为 6。"
#: ../../library/gzip.rst:241
msgid "Command line options"
msgstr "命令行选项"
#: ../../library/gzip.rst:245
msgid "If *file* is not specified, read from :attr:`sys.stdin`."
msgstr "如果 *file* 未指定,则从 :attr:`sys.stdin` 读取。"
#: ../../library/gzip.rst:249
msgid "Indicates the fastest compression method (less compression)."
msgstr "指明最快速的压缩方法(较低压缩率)。"
#: ../../library/gzip.rst:253
msgid "Indicates the slowest compression method (best compression)."
msgstr "指明最慢速的压缩方法(最高压缩率)。"
#: ../../library/gzip.rst:257
msgid "Decompress the given file."
msgstr "解压缩给定的文件。"
#: ../../library/gzip.rst:261
msgid "Show the help message."
msgstr "显示帮助消息。"