-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
lzma.po
725 lines (618 loc) · 32.4 KB
/
lzma.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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Dingyuan Wang <[email protected]>, 2020
# 汪心禾 <[email protected]>, 2020
# Freesand Leo <[email protected]>, 2020
# nick <[email protected]>, 2020
# ppcfish <[email protected]>, 2020
# 1lin24 <[email protected]>, 2020
# Rafael Fontenelle <[email protected]>, 2024
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-26 17:08+0000\n"
"PO-Revision-Date: 2020-05-30 12:05+0000\n"
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\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/lzma.rst:2
msgid ":mod:`lzma` --- Compression using the LZMA algorithm"
msgstr ":mod:`lzma` --- 用 LZMA 算法压缩"
#: ../../library/lzma.rst:12
msgid "**Source code:** :source:`Lib/lzma.py`"
msgstr "**源代码:** :source:`Lib/lzma.py`"
#: ../../library/lzma.rst:16
msgid ""
"This module provides classes and convenience functions for compressing and "
"decompressing data using the LZMA compression algorithm. Also included is a "
"file interface supporting the ``.xz`` and legacy ``.lzma`` file formats used"
" by the :program:`xz` utility, as well as raw compressed streams."
msgstr ""
"此模块提供了可以压缩和解压缩使用 LZMA 压缩算法的数据的类和便携函数。 其中还包含支持 :program:`xz` 工具所使用的 ``.xz`` "
"和旧式 ``.lzma`` 文件格式的文件接口,以及相应的原始压缩数据流。"
#: ../../library/lzma.rst:21
msgid ""
"The interface provided by this module is very similar to that of the "
":mod:`bz2` module. However, note that :class:`LZMAFile` is *not* thread-"
"safe, unlike :class:`bz2.BZ2File`, so if you need to use a single "
":class:`LZMAFile` instance from multiple threads, it is necessary to protect"
" it with a lock."
msgstr ""
"此模块所提供的接口与 :mod:`bz2` 模块的非常类似。 但是,请注意 :class:`LZMAFile` *不是* 线程安全的,这与 "
":class:`bz2.BZ2File` 不同,因此如果你需要在多个线程中使用单个 :class:`LZMAFile` 实例,则需要通过锁来保护它。"
#: ../../library/lzma.rst:29
msgid ""
"This exception is raised when an error occurs during compression or "
"decompression, or while initializing the compressor/decompressor state."
msgstr "当在压缩或解压缩期间或是在初始化压缩器/解压缩器的状态期间发生错误时此异常会被引发。"
#: ../../library/lzma.rst:34
msgid "Reading and writing compressed files"
msgstr "读写压缩文件"
#: ../../library/lzma.rst:38
msgid ""
"Open an LZMA-compressed file in binary or text mode, returning a :term:`file"
" object`."
msgstr "以二进制或文本模式打开 LZMA 压缩文件,返回一个 :term:`file object`。"
#: ../../library/lzma.rst:41
msgid ""
"The *filename* argument can be either an actual file name (given as a "
":class:`str`, :class:`bytes` or :term:`path-like <path-like object>` "
"object), in which case the named file is opened, or it can be an existing "
"file object to read from or write to."
msgstr ""
"*filename* 参数可以是一个实际的文件名(以 :class:`str`, :class:`bytes` 或 :term:`路径类 <path-"
"like object>` 对象的形式给出),在此情况下会打开指定名称的文件,或者可以是一个用于读写的现有文件对象。"
#: ../../library/lzma.rst:46
msgid ""
"The *mode* argument can be any of ``\"r\"``, ``\"rb\"``, ``\"w\"``, "
"``\"wb\"``, ``\"x\"``, ``\"xb\"``, ``\"a\"`` or ``\"ab\"`` for binary mode, "
"or ``\"rt\"``, ``\"wt\"``, ``\"xt\"``, or ``\"at\"`` for text mode. The "
"default is ``\"rb\"``."
msgstr ""
"*mode* 参数可以是二进制模式的 ``\"r\"``, ``\"rb\"``, ``\"w\"``, ``\"wb\"``, ``\"x\"``, "
"``\"xb\"``, ``\"a\"`` 或 ``\"ab\"``,或者文本模式的 ``\"rt\"``, ``\"wt\"``, "
"``\"xt\"`` 或 ``\"at\"``。 默认值为 ``\"rb\"``。"
#: ../../library/lzma.rst:50 ../../library/lzma.rst:95
msgid ""
"When opening a file for reading, the *format* and *filters* arguments have "
"the same meanings as for :class:`LZMADecompressor`. In this case, the "
"*check* and *preset* arguments should not be used."
msgstr ""
"当打开一个文件用于读取时,*format* 和 *filters* 参数具有与 :class:`LZMADecompressor` 的参数相同的含义。 "
"在此情况下,*check* 和 *preset* 参数不应被使用。"
#: ../../library/lzma.rst:54 ../../library/lzma.rst:99
msgid ""
"When opening a file for writing, the *format*, *check*, *preset* and "
"*filters* arguments have the same meanings as for :class:`LZMACompressor`."
msgstr ""
"当打开一个文件用于写入的,*format*, *check*, *preset* 和 *filters* 参数具有与 "
":class:`LZMACompressor` 的参数相同的含义。"
#: ../../library/lzma.rst:57
msgid ""
"For binary mode, this function is equivalent to the :class:`LZMAFile` "
"constructor: ``LZMAFile(filename, mode, ...)``. In this case, the "
"*encoding*, *errors* and *newline* arguments must not be provided."
msgstr ""
"对于二进制模式,这个函数等价于 :class:`LZMAFile` 构造器: ``LZMAFile(filename, mode, ...)``。 "
"在这种情况下,不可提供 *encoding*, *errors* 和 *newline* 参数。"
#: ../../library/lzma.rst:61
msgid ""
"For text mode, a :class:`LZMAFile` object is created, and wrapped in an "
":class:`io.TextIOWrapper` instance with the specified encoding, error "
"handling behavior, and line ending(s)."
msgstr ""
"对于文本模式,将会创建一个 :class:`LZMAFile` 对象,并将它包装到一个 :class:`io.TextIOWrapper` "
"实例中,此实例带有指定的编码格式、错误处理行为和行结束符。"
#: ../../library/lzma.rst:65
msgid "Added support for the ``\"x\"``, ``\"xb\"`` and ``\"xt\"`` modes."
msgstr "增加了对 ``\"x\"``, ``\"xb\"`` 和 ``\"xt\"`` 模式的支持。"
#: ../../library/lzma.rst:68 ../../library/lzma.rst:126
msgid "Accepts a :term:`path-like object`."
msgstr "接受一个 :term:`path-like object`。"
#: ../../library/lzma.rst:74
msgid "Open an LZMA-compressed file in binary mode."
msgstr "以二进制模式打开一个 LZMA 压缩文件。"
#: ../../library/lzma.rst:76
msgid ""
"An :class:`LZMAFile` can wrap an already-open :term:`file object`, or "
"operate directly on a named file. The *filename* argument specifies either "
"the file object to wrap, or the name of the file to open (as a :class:`str`,"
" :class:`bytes` or :term:`path-like <path-like object>` object). When "
"wrapping an existing file object, the wrapped file will not be closed when "
"the :class:`LZMAFile` is closed."
msgstr ""
":class:`LZMAFile` 可以包装在一个已打开的 :term:`file object` 中,或者是在给定名称的文件上直接操作。 "
"*filename* 参数指定所包装的文件对象,或是要打开的文件名称(类型为 :class:`str`, :class:`bytes` 或 "
":term:`路径类 <path-like object>` 对象)。 如果是包装现有的文件对象,被包装的文件在 :class:`LZMAFile` "
"被关闭时将不会被关闭。"
#: ../../library/lzma.rst:83
msgid ""
"The *mode* argument can be either ``\"r\"`` for reading (default), ``\"w\"``"
" for overwriting, ``\"x\"`` for exclusive creation, or ``\"a\"`` for "
"appending. These can equivalently be given as ``\"rb\"``, ``\"wb\"``, "
"``\"xb\"`` and ``\"ab\"`` respectively."
msgstr ""
"*mode* 参数可以是表示读取的 ``\"r\"`` (默认值),表示覆写的 ``\"w\"``,表示单独创建的 ``\"x\"``,或表示添加的 "
"``\"a\"``。 这些模式还可以分别以 ``\"rb\"``, ``\"wb\"``, ``\"xb\"`` 和 ``\"ab\"`` "
"的等价形式给出。"
#: ../../library/lzma.rst:88
msgid ""
"If *filename* is a file object (rather than an actual file name), a mode of "
"``\"w\"`` does not truncate the file, and is instead equivalent to "
"``\"a\"``."
msgstr "如果 *filename* 是一个文件对象(而不是实际的文件名),则 ``\"w\"`` 模式并不会截断文件,而会等价于 ``\"a\"``。"
#: ../../library/lzma.rst:91
msgid ""
"When opening a file for reading, the input file may be the concatenation of "
"multiple separate compressed streams. These are transparently decoded as a "
"single logical stream."
msgstr "当打开一个文件用于读取时,输入文件可以为多个独立压缩流的拼接。 它们会被作为单个逻辑流被透明地解码。"
#: ../../library/lzma.rst:102
msgid ""
":class:`LZMAFile` supports all the members specified by "
":class:`io.BufferedIOBase`, except for :meth:`detach` and :meth:`truncate`. "
"Iteration and the :keyword:`with` statement are supported."
msgstr ""
":class:`LZMAFile` 支持 :class:`io.BufferedIOBase` 所指定的所有成员,但 :meth:`detach` 和 "
":meth:`truncate` 除外。 并支持迭代和 :keyword:`with` 语句。"
#: ../../library/lzma.rst:106
msgid "The following method is also provided:"
msgstr "还提供了以下方法:"
#: ../../library/lzma.rst:110
msgid ""
"Return buffered data without advancing the file position. At least one byte "
"of data will be returned, unless EOF has been reached. The exact number of "
"bytes returned is unspecified (the *size* argument is ignored)."
msgstr "返回缓冲的数据而不前移文件位置。 至少将返回一个字节的数据,除非已经到达 EOF。 实际返回的字节数不确定(会忽略 *size* 参数)。"
#: ../../library/lzma.rst:114
msgid ""
"While calling :meth:`peek` does not change the file position of the "
":class:`LZMAFile`, it may change the position of the underlying file object "
"(e.g. if the :class:`LZMAFile` was constructed by passing a file object for "
"*filename*)."
msgstr ""
"虽然调用 :meth:`peek` 不会改变 :class:`LZMAFile` 的文件位置,但它可能改变下层文件对象的位置(举例来说如果 "
":class:`LZMAFile` 是通过传入一个文件对象作为 *filename* 的话)。"
#: ../../library/lzma.rst:119
msgid "Added support for the ``\"x\"`` and ``\"xb\"`` modes."
msgstr "增加了对 ``\"x\"`` 和 ``\"xb\"`` 模式的支持。"
#: ../../library/lzma.rst:122
msgid ""
"The :meth:`~io.BufferedIOBase.read` method now accepts an argument of "
"``None``."
msgstr ":meth:`~io.BufferedIOBase.read` 方法现在接受 ``None`` 作为参数。"
#: ../../library/lzma.rst:131
msgid "Compressing and decompressing data in memory"
msgstr "在内存中压缩和解压缩数据"
#: ../../library/lzma.rst:135
msgid ""
"Create a compressor object, which can be used to compress data "
"incrementally."
msgstr "创建一个压缩器对象,此对象可被用来执行增量压缩。"
#: ../../library/lzma.rst:137
msgid ""
"For a more convenient way of compressing a single chunk of data, see "
":func:`compress`."
msgstr "压缩单个数据块的更便捷方式请参阅 :func:`compress`。"
#: ../../library/lzma.rst:140
msgid ""
"The *format* argument specifies what container format should be used. "
"Possible values are:"
msgstr "*format* 参数指定应当使用哪种容器格式。 可能的值有:"
#: ../../library/lzma.rst:144
msgid ":const:`FORMAT_XZ`: The ``.xz`` container format."
msgstr ":const:`FORMAT_XZ`: ``.xz`` 容器格式。"
#: ../../library/lzma.rst:144
msgid "This is the default format."
msgstr "这是默认格式。"
#: ../../library/lzma.rst:148
msgid ":const:`FORMAT_ALONE`: The legacy ``.lzma`` container format."
msgstr ":const:`FORMAT_ALONE`: 传统的 ``.lzma`` 容器格式。"
#: ../../library/lzma.rst:147
msgid ""
"This format is more limited than ``.xz`` -- it does not support integrity "
"checks or multiple filters."
msgstr "这种格式相比 ``.xz`` 更为受限 -- 它不支持一致性检查或多重过滤器。"
#: ../../library/lzma.rst:154
msgid ""
":const:`FORMAT_RAW`: A raw data stream, not using any container format."
msgstr ":const:`FORMAT_RAW`: 原始数据流,不使用任何容器格式。"
#: ../../library/lzma.rst:151
msgid ""
"This format specifier does not support integrity checks, and requires that "
"you always specify a custom filter chain (for both compression and "
"decompression). Additionally, data compressed in this manner cannot be "
"decompressed using :const:`FORMAT_AUTO` (see :class:`LZMADecompressor`)."
msgstr ""
"这个格式描述器不支持一致性检查,并且要求你必须指定一个自定义的过滤器链(用于压缩和解压缩)。 此外,以这种方式压缩的数据不可使用 "
":const:`FORMAT_AUTO` 来解压缩 (参见 :class:`LZMADecompressor`)。"
#: ../../library/lzma.rst:156
msgid ""
"The *check* argument specifies the type of integrity check to include in the"
" compressed data. This check is used when decompressing, to ensure that the "
"data has not been corrupted. Possible values are:"
msgstr "*check* 参数指定要包含在压缩数据中的一致性检查类型。 这种检查在解压缩时使用,以确保数据没有被破坏。 可能的值是:"
#: ../../library/lzma.rst:160
msgid ""
":const:`CHECK_NONE`: No integrity check. This is the default (and the only "
"acceptable value) for :const:`FORMAT_ALONE` and :const:`FORMAT_RAW`."
msgstr ""
":const:`CHECK_NONE`: 没有一致性检查。 这是 :const:`FORMAT_ALONE` 和 :const:`FORMAT_RAW`"
" 的默认值(也是唯一可接受的值)。"
#: ../../library/lzma.rst:164
msgid ":const:`CHECK_CRC32`: 32-bit Cyclic Redundancy Check."
msgstr ":const:`CHECK_CRC32`: 32 位循环冗余检查。"
#: ../../library/lzma.rst:166
msgid ""
":const:`CHECK_CRC64`: 64-bit Cyclic Redundancy Check. This is the default "
"for :const:`FORMAT_XZ`."
msgstr ":const:`CHECK_CRC64`: 64 位循环冗余检查。 这是 :const:`FORMAT_XZ` 的默认值。"
#: ../../library/lzma.rst:169
msgid ":const:`CHECK_SHA256`: 256-bit Secure Hash Algorithm."
msgstr ":const:`CHECK_SHA256`: 256 位安全哈希算法。"
#: ../../library/lzma.rst:171
msgid ""
"If the specified check is not supported, an :class:`LZMAError` is raised."
msgstr "如果指定的检查不受支持,则会引发 :class:`LZMAError`。"
#: ../../library/lzma.rst:173
msgid ""
"The compression settings can be specified either as a preset compression "
"level (with the *preset* argument), or in detail as a custom filter chain "
"(with the *filters* argument)."
msgstr "压缩设置可被指定为一个预设的压缩等级(通过 *preset* 参数)或以自定义过滤器链来详细设置(通过 *filters* 参数)。"
#: ../../library/lzma.rst:177
msgid ""
"The *preset* argument (if provided) should be an integer between ``0`` and "
"``9`` (inclusive), optionally OR-ed with the constant "
":const:`PRESET_EXTREME`. If neither *preset* nor *filters* are given, the "
"default behavior is to use :const:`PRESET_DEFAULT` (preset level ``6``). "
"Higher presets produce smaller output, but make the compression process "
"slower."
msgstr ""
"*preset* 参数(如果提供)应当为一个 ``0`` 到 ``9`` (包括边界) 之间的整数,可以选择与常数 "
":const:`PRESET_EXTREME` 进行 OR 运算。 如果 *preset* 和 *filters* 均未给出,则默认行为是使用 "
":const:`PRESET_DEFAULT` (预设等级 ``6``)。 更高的预设等级会产生更小的输出,但会使得压缩过程更缓慢。"
#: ../../library/lzma.rst:186
msgid ""
"In addition to being more CPU-intensive, compression with higher presets "
"also requires much more memory (and produces output that needs more memory "
"to decompress). With preset ``9`` for example, the overhead for an "
":class:`LZMACompressor` object can be as high as 800 MiB. For this reason, "
"it is generally best to stick with the default preset."
msgstr ""
"除了更加 CPU 密集,使用更高的预设等级来压缩还需要更多的内存(并产生需要更多内存来解压缩的输出)。 例如使用预设等级 ``9`` 时,一个 "
":class:`LZMACompressor` 对象的开销可以高达 800 MiB。 出于这样的原因,通常最好是保持使用默认预设等级。"
#: ../../library/lzma.rst:192
msgid ""
"The *filters* argument (if provided) should be a filter chain specifier. See"
" :ref:`filter-chain-specs` for details."
msgstr "*filters* 参数(如果提供)应当指定一个过滤器链。 详情参见 :ref:`filter-chain-specs`。"
#: ../../library/lzma.rst:197
msgid ""
"Compress *data* (a :class:`bytes` object), returning a :class:`bytes` object"
" containing compressed data for at least part of the input. Some of *data* "
"may be buffered internally, for use in later calls to :meth:`compress` and "
":meth:`flush`. The returned data should be concatenated with the output of "
"any previous calls to :meth:`compress`."
msgstr ""
"压缩 *data* (一个 :class:`bytes` object),返回包含针对输入的至少一部分已压缩数据的 :class:`bytes` 对象。"
" 一部 *data* 可能会被放入内部缓冲区,以便用于后续的 :meth:`compress` 和 :meth:`flush` 调用。 "
"返回的数据应当与之前任何 :meth:`compress` 调用的输出进行拼接。"
#: ../../library/lzma.rst:205
msgid ""
"Finish the compression process, returning a :class:`bytes` object containing"
" any data stored in the compressor's internal buffers."
msgstr "结束压缩进程,返回包含保存在压缩器的内部缓冲区中的任意数据的 :class:`bytes` 对象。"
#: ../../library/lzma.rst:208
msgid "The compressor cannot be used after this method has been called."
msgstr "调用此方法之后压缩器将不可再被使用。"
#: ../../library/lzma.rst:213
msgid ""
"Create a decompressor object, which can be used to decompress data "
"incrementally."
msgstr "创建一个压缩器对象,此对象可被用来执行增量解压缩。"
#: ../../library/lzma.rst:216
msgid ""
"For a more convenient way of decompressing an entire compressed stream at "
"once, see :func:`decompress`."
msgstr "一次性解压缩整个压缩数据流的更便捷方式请参阅 :func:`decompress`。"
#: ../../library/lzma.rst:219
msgid ""
"The *format* argument specifies the container format that should be used. "
"The default is :const:`FORMAT_AUTO`, which can decompress both ``.xz`` and "
"``.lzma`` files. Other possible values are :const:`FORMAT_XZ`, "
":const:`FORMAT_ALONE`, and :const:`FORMAT_RAW`."
msgstr ""
"*format* 参数指定应当被使用的容器格式。 默认值为 :const:`FORMAT_AUTO`,它可以解压缩 ``.xz`` 和 "
"``.lzma`` 文件。 其他可能的值为 :const:`FORMAT_XZ`, :const:`FORMAT_ALONE` 和 "
":const:`FORMAT_RAW`。"
#: ../../library/lzma.rst:224
msgid ""
"The *memlimit* argument specifies a limit (in bytes) on the amount of memory"
" that the decompressor can use. When this argument is used, decompression "
"will fail with an :class:`LZMAError` if it is not possible to decompress the"
" input within the given memory limit."
msgstr ""
"*memlimit* 参数指定解压缩器可以使用的内存上限(字节数)。 当使用此参数时,如果不可能在给定内存上限之内解压缩输入数据则解压缩将失败并引发 "
":class:`LZMAError`。"
#: ../../library/lzma.rst:229
msgid ""
"The *filters* argument specifies the filter chain that was used to create "
"the stream being decompressed. This argument is required if *format* is "
":const:`FORMAT_RAW`, but should not be used for other formats. See "
":ref:`filter-chain-specs` for more information about filter chains."
msgstr ""
"*filters* 参数指定用于创建被解压缩数据流的过滤器链。 此参数在 *format* 为 :const:`FORMAT_RAW` "
"时要求提供,但对于其他格式不应使用。 有关过滤器链的更多信息请参阅 :ref:`filter-chain-specs`。"
#: ../../library/lzma.rst:235
msgid ""
"This class does not transparently handle inputs containing multiple "
"compressed streams, unlike :func:`decompress` and :class:`LZMAFile`. To "
"decompress a multi-stream input with :class:`LZMADecompressor`, you must "
"create a new decompressor for each stream."
msgstr ""
"这个类不会透明地处理包含多个已压缩数据流的输入,这不同于 :func:`decompress` 和 :class:`LZMAFile`。 要通过 "
":class:`LZMADecompressor` 来解压缩多个数据流输入,你必须为每个数据流都创建一个新的解压缩器。"
#: ../../library/lzma.rst:242
msgid ""
"Decompress *data* (a :term:`bytes-like object`), returning uncompressed data"
" as bytes. Some of *data* may be buffered internally, for use in later calls"
" to :meth:`decompress`. The returned data should be concatenated with the "
"output of any previous calls to :meth:`decompress`."
msgstr ""
"解压缩 *data* (一个 :term:`bytes-like object`),返回字节串形式的解压缩数据。 某些 *data* "
"可以在内部被缓冲,以便用于后续的 :meth:`decompress` 调用。 返回的数据应当与之前任何 :meth:`decompress` "
"调用的输出进行拼接。"
#: ../../library/lzma.rst:248
msgid ""
"If *max_length* is nonnegative, returns at most *max_length* bytes of "
"decompressed data. If this limit is reached and further output can be "
"produced, the :attr:`~.needs_input` attribute will be set to ``False``. In "
"this case, the next call to :meth:`~.decompress` may provide *data* as "
"``b''`` to obtain more of the output."
msgstr ""
"如果 *max_length* 为非负数,将返回至多 *max_length* 个字节的解压缩数据。 如果达到此限制并且可以产生后续输出,则 "
":attr:`~.needs_input` 属性将被设为 ``False``。 在这种情况下,下一次 :meth:`~.decompress` "
"调用提供的 *data* 可以为 ``b''`` 以获取更多的输出。"
#: ../../library/lzma.rst:255
msgid ""
"If all of the input data was decompressed and returned (either because this "
"was less than *max_length* bytes, or because *max_length* was negative), the"
" :attr:`~.needs_input` attribute will be set to ``True``."
msgstr ""
"如果所有输入数据都已被解压缩并返回(或是因为它少于 *max_length* 个字节,或是因为 *max_length* 为负数),则 "
":attr:`~.needs_input` 属性将被设为 ``True``。"
#: ../../library/lzma.rst:260
msgid ""
"Attempting to decompress data after the end of stream is reached raises an "
"`EOFError`. Any data found after the end of the stream is ignored and saved"
" in the :attr:`~.unused_data` attribute."
msgstr ""
"在到达数据流末尾之后再尝试解压缩数据会引发 `EOFError`。 在数据流末尾之后获取的任何数据都会被忽略并存储至 "
":attr:`~.unused_data` 属性。"
#: ../../library/lzma.rst:264
msgid "Added the *max_length* parameter."
msgstr "添加了 *max_length* 形参。"
#: ../../library/lzma.rst:269
msgid ""
"The ID of the integrity check used by the input stream. This may be "
":const:`CHECK_UNKNOWN` until enough of the input has been decoded to "
"determine what integrity check it uses."
msgstr ""
"输入流使用的一致性检查的 ID。 这可能为 :const:`CHECK_UNKNOWN` 直到已解压了足够的输入数据来确定它所使用的一致性检查。"
#: ../../library/lzma.rst:275
msgid "``True`` if the end-of-stream marker has been reached."
msgstr "若达到了数据流的末尾标记则为 ``True``。"
#: ../../library/lzma.rst:279
msgid "Data found after the end of the compressed stream."
msgstr "在压缩数据流的末尾之后获取的数据。"
#: ../../library/lzma.rst:281
msgid "Before the end of the stream is reached, this will be ``b\"\"``."
msgstr "在达到数据流末尾之前,这个值将为 ``b\"\"``。"
#: ../../library/lzma.rst:285
msgid ""
"``False`` if the :meth:`.decompress` method can provide more decompressed "
"data before requiring new uncompressed input."
msgstr "如果在要求新的未解压缩输入之前 :meth:`.decompress` 方法可以提供更多的解压缩数据则为 ``False``。"
#: ../../library/lzma.rst:292
msgid ""
"Compress *data* (a :class:`bytes` object), returning the compressed data as "
"a :class:`bytes` object."
msgstr "压缩 *data* (一个 :class:`bytes` 对象),返回包含压缩数据的 :class:`bytes` 对象。"
#: ../../library/lzma.rst:295
msgid ""
"See :class:`LZMACompressor` above for a description of the *format*, "
"*check*, *preset* and *filters* arguments."
msgstr ""
"参见上文的 :class:`LZMACompressor` 了解有关 *format*, *check*, *preset* 和 *filters* "
"参数的说明。"
#: ../../library/lzma.rst:301
msgid ""
"Decompress *data* (a :class:`bytes` object), returning the uncompressed data"
" as a :class:`bytes` object."
msgstr "解压缩 *data* (一个 :class:`bytes` 对象),返回包含解压缩数据的 :class:`bytes` 对象。"
#: ../../library/lzma.rst:304
msgid ""
"If *data* is the concatenation of multiple distinct compressed streams, "
"decompress all of these streams, and return the concatenation of the "
"results."
msgstr "如果 *data* 是多个单独压缩数据流的拼接,则解压缩所有相应数据流,并返回结果的拼接。"
#: ../../library/lzma.rst:307
msgid ""
"See :class:`LZMADecompressor` above for a description of the *format*, "
"*memlimit* and *filters* arguments."
msgstr ""
"参见上文的 :class:`LZMADecompressor` 了解有关 *format*, *memlimit* 和 *filters* 参数的说明。"
#: ../../library/lzma.rst:312
msgid "Miscellaneous"
msgstr "杂项"
#: ../../library/lzma.rst:316
msgid ""
"Return ``True`` if the given integrity check is supported on this system."
msgstr "如果本系统支持给定的一致性检查则返回 ``True``。"
#: ../../library/lzma.rst:318
msgid ""
":const:`CHECK_NONE` and :const:`CHECK_CRC32` are always supported. "
":const:`CHECK_CRC64` and :const:`CHECK_SHA256` may be unavailable if you are"
" using a version of :program:`liblzma` that was compiled with a limited "
"feature set."
msgstr ""
":const:`CHECK_NONE` 和 :const:`CHECK_CRC32` 总是受支持。 :const:`CHECK_CRC64` 和 "
":const:`CHECK_SHA256` 或许不可用,如果你正在使用基于受限制特性集编译的 :program:`liblzma` 版本的话。"
#: ../../library/lzma.rst:327
msgid "Specifying custom filter chains"
msgstr "指定自定义的过滤器链"
#: ../../library/lzma.rst:329
msgid ""
"A filter chain specifier is a sequence of dictionaries, where each "
"dictionary contains the ID and options for a single filter. Each dictionary "
"must contain the key ``\"id\"``, and may contain additional keys to specify "
"filter-dependent options. Valid filter IDs are as follows:"
msgstr ""
"过滤器链描述符是由字典组成的序列,其中每个字典包含单个过滤器的 ID 和选项。 每个字典必须包含键 "
"``\"id\"``,并可能包含额外的键用来指定基于过滤器的选项。 有效的过滤器 ID 如下:"
#: ../../library/lzma.rst:336
msgid "Compression filters:"
msgstr "压缩过滤器:"
#: ../../library/lzma.rst:335
msgid ":const:`FILTER_LZMA1` (for use with :const:`FORMAT_ALONE`)"
msgstr ":const:`FILTER_LZMA1` (配合 :const:`FORMAT_ALONE` 使用)"
#: ../../library/lzma.rst:336
msgid ""
":const:`FILTER_LZMA2` (for use with :const:`FORMAT_XZ` and "
":const:`FORMAT_RAW`)"
msgstr ""
":const:`FILTER_LZMA2` (配合 :const:`FORMAT_XZ` 和 :const:`FORMAT_RAW` 使用)"
#: ../../library/lzma.rst:339
msgid "Delta filter:"
msgstr "Delta 过滤器:"
#: ../../library/lzma.rst:339
msgid ":const:`FILTER_DELTA`"
msgstr ":const:`FILTER_DELTA`"
#: ../../library/lzma.rst:347
msgid "Branch-Call-Jump (BCJ) filters:"
msgstr "Branch-Call-Jump (BCJ) 过滤器:"
#: ../../library/lzma.rst:342
msgid ":const:`FILTER_X86`"
msgstr ":const:`FILTER_X86`"
#: ../../library/lzma.rst:343
msgid ":const:`FILTER_IA64`"
msgstr ":const:`FILTER_IA64`"
#: ../../library/lzma.rst:344
msgid ":const:`FILTER_ARM`"
msgstr ":const:`FILTER_ARM`"
#: ../../library/lzma.rst:345
msgid ":const:`FILTER_ARMTHUMB`"
msgstr ":const:`FILTER_ARMTHUMB`"
#: ../../library/lzma.rst:346
msgid ":const:`FILTER_POWERPC`"
msgstr ":const:`FILTER_POWERPC`"
#: ../../library/lzma.rst:347
msgid ":const:`FILTER_SPARC`"
msgstr ":const:`FILTER_SPARC`"
#: ../../library/lzma.rst:349
msgid ""
"A filter chain can consist of up to 4 filters, and cannot be empty. The last"
" filter in the chain must be a compression filter, and any other filters "
"must be delta or BCJ filters."
msgstr ""
"一个过滤器链最多可由 4 个过滤器组成,并且不能为空。 过滤器链中的最后一个过滤器必须为压缩过滤器,其他过滤器必须为 Delta 或 BCJ 过滤器。"
#: ../../library/lzma.rst:353
msgid ""
"Compression filters support the following options (specified as additional "
"entries in the dictionary representing the filter):"
msgstr "压缩过滤器支持下列选项(指定为表示过滤器的字典中的附加条目):"
#: ../../library/lzma.rst:356
msgid ""
"``preset``: A compression preset to use as a source of default values for "
"options that are not specified explicitly."
msgstr "``preset``: 压缩预设选项,用于作为未显式指定的选项的默认值的来源。"
#: ../../library/lzma.rst:358
msgid ""
"``dict_size``: Dictionary size in bytes. This should be between 4 KiB and "
"1.5 GiB (inclusive)."
msgstr "``dict_size``: 以字节表示的字典大小。 这应当在 4 KiB 和 1.5 GiB 之间(包含边界)。"
#: ../../library/lzma.rst:360
msgid "``lc``: Number of literal context bits."
msgstr "``lc``: 字面值上下文的比特数。"
#: ../../library/lzma.rst:361
msgid ""
"``lp``: Number of literal position bits. The sum ``lc + lp`` must be at most"
" 4."
msgstr "``lp``: 字面值位置的比特数。 总计值 ``lc + lp`` 必须不大于 4。"
#: ../../library/lzma.rst:363
msgid "``pb``: Number of position bits; must be at most 4."
msgstr "``pb``: 位置的比特数;必须不大于 4。"
#: ../../library/lzma.rst:364
msgid "``mode``: :const:`MODE_FAST` or :const:`MODE_NORMAL`."
msgstr "``mode``: :const:`MODE_FAST` 或 :const:`MODE_NORMAL`。"
#: ../../library/lzma.rst:365
msgid ""
"``nice_len``: What should be considered a \"nice length\" for a match. This "
"should be 273 or less."
msgstr "``nice_len``: 对于一个匹配应当被视为“适宜长度”的值。 这应当小于或等于 273。"
#: ../../library/lzma.rst:367
msgid ""
"``mf``: What match finder to use -- :const:`MF_HC3`, :const:`MF_HC4`, "
":const:`MF_BT2`, :const:`MF_BT3`, or :const:`MF_BT4`."
msgstr ""
"``mf``: 要使用的匹配查找器 -- :const:`MF_HC3`, :const:`MF_HC4`, :const:`MF_BT2`, "
":const:`MF_BT3` 或 :const:`MF_BT4`。"
#: ../../library/lzma.rst:369
msgid ""
"``depth``: Maximum search depth used by match finder. 0 (default) means to "
"select automatically based on other filter options."
msgstr "``depth``: 匹配查找器使用的最大查找深度。 0 (默认值) 表示基于其他过滤器选项自动选择。"
#: ../../library/lzma.rst:372
msgid ""
"The delta filter stores the differences between bytes, producing more "
"repetitive input for the compressor in certain circumstances. It supports "
"one option, ``dist``. This indicates the distance between bytes to be "
"subtracted. The default is 1, i.e. take the differences between adjacent "
"bytes."
msgstr ""
"Delta 过滤器保存字节数据之间的差值,在特定环境下可产生更具重复性的输入。 它支持一个 ``dist`` 选项,指明要减去的字节之间的差值大小。 "
"默认值为 1,即相邻字节之间的差值。"
#: ../../library/lzma.rst:377
msgid ""
"The BCJ filters are intended to be applied to machine code. They convert "
"relative branches, calls and jumps in the code to use absolute addressing, "
"with the aim of increasing the redundancy that can be exploited by the "
"compressor. These filters support one option, ``start_offset``. This "
"specifies the address that should be mapped to the beginning of the input "
"data. The default is 0."
msgstr ""
"BCJ 过滤器主要作用于机器码。 它们会转换机器码内的相对分支、调用和跳转以使用绝对寻址,其目标是提升冗余度以供压缩器利用。 这些过滤器支持一个 "
"``start_offset`` 选项,指明应当被映射到输入数据开头的地址。 默认值为 0。"
#: ../../library/lzma.rst:385
msgid "Examples"
msgstr "例子"
#: ../../library/lzma.rst:387
msgid "Reading in a compressed file::"
msgstr "在已压缩的数据中读取::"
#: ../../library/lzma.rst:393
msgid "Creating a compressed file::"
msgstr "创建一个压缩文件::"
#: ../../library/lzma.rst:400
msgid "Compressing data in memory::"
msgstr "在内存中压缩文件::"
#: ../../library/lzma.rst:406
msgid "Incremental compression::"
msgstr "增量压缩::"
#: ../../library/lzma.rst:417
msgid "Writing compressed data to an already-open file::"
msgstr "写入已压缩数据到已打开的文件::"
#: ../../library/lzma.rst:426
msgid "Creating a compressed file using a custom filter chain::"
msgstr "使用自定义过滤器链创建一个已压缩文件::"