@@ -309,6 +309,9 @@ msgid ""
309309" to :meth:`decompress`. The returned data should be concatenated with the "
310310"output of any previous calls to :meth:`decompress`."
311311msgstr ""
312+ "解压缩 *data* (一个 :term:`bytes-like object`),返回字节串形式的解压缩数据。 某些 *data* "
313+ "可以在内部被缓冲,以便用于后续的 :meth:`decompress` 调用。 返回的数据应当与之前任何 :meth:`decompress` "
314+ "调用的输出进行拼接。"
312315
313316#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:191
314317msgid ""
@@ -318,70 +321,77 @@ msgid ""
318321"this case, the next call to :meth:`~.decompress` may provide *data* as "
319322"``b''`` to obtain more of the output."
320323msgstr ""
324+ "如果 *max_length* 为非负数,将返回至多 *max_length* 个字节的解压缩数据。 如果达到此限制并且可以产生后续输出,则 "
325+ ":attr:`~.needs_input` 属性将被设为 ``False``。 在这种情况下,下一次 :meth:`~.decompress` "
326+ "调用提供的 *data* 可以为 ``b''`` 以获取更多的输出。"
321327
322328#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:198
323329msgid ""
324330"If all of the input data was decompressed and returned (either because this "
325331"was less than *max_length* bytes, or because *max_length* was negative), the"
326332" :attr:`~.needs_input` attribute will be set to ``True``."
327333msgstr ""
334+ "如果所有输入数据都已被解压缩并返回(或是因为它少于 *max_length* 个字节,或是因为 *max_length* 为负数),则 "
335+ ":attr:`~.needs_input` 属性将被设为 ``True``。"
328336
329337#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:203
330338msgid ""
331339"Attempting to decompress data after the end of stream is reached raises an "
332340"`EOFError`. Any data found after the end of the stream is ignored and saved"
333341" in the :attr:`~.unused_data` attribute."
334342msgstr ""
343+ "在到达数据流末尾之后再尝试解压缩数据会引发 `EOFError`。 在数据流末尾之后获取的任何数据都会被忽略并存储至 "
344+ ":attr:`~.unused_data` 属性。"
335345
336346#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:207
337347msgid "Added the *max_length* parameter."
338- msgstr ""
348+ msgstr "添加了 *max_length* 形参。 "
339349
340350#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:212
341351msgid "``True`` if the end-of-stream marker has been reached."
342- msgstr "若达到了数据流末尾标识符则为 ``True``。"
352+ msgstr "若达到了数据流的末尾标记则为 ``True``。"
343353
344354#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:219
345355msgid "Data found after the end of the compressed stream."
346- msgstr "压缩数据流的末尾还有数据 。"
356+ msgstr "在压缩数据流的末尾之后获取的数据 。"
347357
348358#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:221
349359msgid ""
350360"If this attribute is accessed before the end of the stream has been reached,"
351361" its value will be ``b''``."
352- msgstr ""
362+ msgstr "如果在达到数据流末尾之前访问此属性,其值将为 ``b''``。 "
353363
354364#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:226
355365msgid ""
356366"``False`` if the :meth:`.decompress` method can provide more decompressed "
357367"data before requiring new uncompressed input."
358- msgstr ""
368+ msgstr "如果在要求新的未解压缩输入之前 :meth:`.decompress` 方法可以提供更多的解压缩数据则为 ``False``。 "
359369
360370#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:233
361371msgid "One-shot (de)compression"
362- msgstr "一次性压缩或解压 "
372+ msgstr "一次性压缩或解压缩 "
363373
364374#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:237
365375msgid "Compress *data*, a :term:`bytes-like object <bytes-like object>`."
366- msgstr ""
376+ msgstr "压缩 *data*,此参数为一个 :term:`字节类对象 <bytes-like object>`。 "
367377
368378#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:242
369379msgid "For incremental compression, use a :class:`BZ2Compressor` instead."
370- msgstr ""
380+ msgstr "对于增量压缩,请改用 :class:`BZ2Compressor`。 "
371381
372382#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:247
373383msgid "Decompress *data*, a :term:`bytes-like object <bytes-like object>`."
374- msgstr ""
384+ msgstr "解压缩 *data*,此参数为一个 :term:`字节类对象 <bytes-like object>`。 "
375385
376386#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:249
377387msgid ""
378388"If *data* is the concatenation of multiple compressed streams, decompress "
379389"all of the streams."
380- msgstr ""
390+ msgstr "如果 *data* 是多个压缩数据流的拼接,则解压缩所有数据流。 "
381391
382392#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:252
383393msgid "For incremental decompression, use a :class:`BZ2Decompressor` instead."
384- msgstr ""
394+ msgstr "对于增量解压缩,请改用 :class:`BZ2Decompressor`。 "
385395
386396#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:254
387397msgid "Support for multi-stream inputs was added."
@@ -393,25 +403,25 @@ msgstr "用法示例"
393403
394404#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:262
395405msgid "Below are some examples of typical usage of the :mod:`bz2` module."
396- msgstr ""
406+ msgstr "以下是 :mod:`bz2` 模块典型用法的一些示例。 "
397407
398408#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:264
399409msgid ""
400410"Using :func:`compress` and :func:`decompress` to demonstrate round-trip "
401411"compression:"
402- msgstr ""
412+ msgstr "使用 :func:`compress` 和 :func:`decompress` 来显示往复式的压缩: "
403413
404414#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:285
405415msgid "Using :class:`BZ2Compressor` for incremental compression:"
406- msgstr ""
416+ msgstr "使用 :class:`BZ2Compressor` 进行增量压缩: "
407417
408418#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:304
409419msgid ""
410420"The example above uses a very \" nonrandom\" stream of data (a stream of "
411421"`b\" z\" ` chunks). Random data tends to compress poorly, while ordered, "
412422"repetitive data usually yields a high compression ratio."
413- msgstr ""
423+ msgstr "上面的示例使用了十分“非随机”的数据流(即 `b \" z \" ` 块数据流)。 随机数据的压缩率通常很差,而有序、重复的数据通常会产生很高的压缩率。 "
414424
415425#: /home/travis/build/python/cpython-doc-catalog/Doc/library/bz2.rst:308
416426msgid "Writing and reading a bzip2-compressed file in binary mode:"
417- msgstr ""
427+ msgstr "用二进制模式写入和读取 bzip2 压缩文件: "
0 commit comments