“Python/docs/3.9/library/archiving”的版本间差异
来自菜鸟教程
Python/docs/3.9/library/archiving
(autoload) |
小 (Page commit) |
||
第1行: | 第1行: | ||
+ | {{DISPLAYTITLE:数据压缩和归档 — Python 文档}} | ||
<div id="data-compression-and-archiving" class="section"> | <div id="data-compression-and-archiving" class="section"> | ||
<span id="archiving"></span> | <span id="archiving"></span> | ||
− | = | + | = 数据压缩和归档 = |
− | + | 本章中描述的模块支持使用 zlib、gzip、bzip2 和 lzma 算法进行数据压缩,以及创建 ZIP 和 tar 格式的档案。 另见 [[../shutil#archiving-operations|归档操作]] 由 [[../shutil#module-shutil|shutil]] 模块提供。 | |
− | |||
− | |||
− | |||
<div class="toctree-wrapper compound"> | <div class="toctree-wrapper compound"> | ||
− | * [[../zlib|<code>zlib</code> | + | * [[../zlib|<code>zlib</code> — 压缩兼容 '''gzip''']] |
− | * [[../gzip|<code>gzip</code> | + | * [[../gzip|<code>gzip</code> — 支持 '''gzip''' 文件]] |
− | ** [[../gzip#examples-of-usage| | + | ** [[../gzip#examples-of-usage|使用示例]] |
− | ** [[../gzip#command-line-interface| | + | ** [[../gzip#command-line-interface|命令行界面]] |
− | *** [[../gzip#command-line-options| | + | *** [[../gzip#command-line-options|命令行选项]] |
− | * [[../bz2|<code>bz2</code> | + | * [[../bz2|<code>bz2</code> — 支持 '''bzip2''' 压缩]] |
− | ** [[../bz2#de-compression-of-files|( | + | ** [[../bz2#de-compression-of-files|(解)压缩文件]] |
− | ** [[../bz2#incremental-de-compression| | + | ** [[../bz2#incremental-de-compression|增量(解)压缩]] |
− | ** [[../bz2#one-shot-de-compression| | + | ** [[../bz2#one-shot-de-compression|一次性(解)压缩]] |
− | ** [[../bz2#examples-of-usage| | + | ** [[../bz2#examples-of-usage|使用示例]] |
− | * [[../lzma|<code>lzma</code> | + | * [[../lzma|<code>lzma</code> — 使用 LZMA 算法进行压缩]] |
− | ** [[../lzma#reading-and-writing-compressed-files| | + | ** [[../lzma#reading-and-writing-compressed-files|读取和写入压缩文件]] |
− | ** [[../lzma#compressing-and-decompressing-data-in-memory| | + | ** [[../lzma#compressing-and-decompressing-data-in-memory|压缩和解压缩内存中的数据]] |
− | ** [[../lzma#miscellaneous| | + | ** [[../lzma#miscellaneous|各种各样的]] |
− | ** [[../lzma#specifying-custom-filter-chains| | + | ** [[../lzma#specifying-custom-filter-chains|指定自定义过滤器链]] |
− | ** [[../lzma#examples| | + | ** [[../lzma#examples|例子]] |
− | * [[../zipfile|<code>zipfile</code> | + | * [[../zipfile|<code>zipfile</code> — 使用 ZIP 档案]] |
− | ** [[../zipfile#zipfile-objects|ZipFile | + | ** [[../zipfile#zipfile-objects|ZipFile 对象]] |
− | ** [[../zipfile#path-objects| | + | ** [[../zipfile#path-objects|路径对象]] |
− | ** [[../zipfile#pyzipfile-objects|PyZipFile | + | ** [[../zipfile#pyzipfile-objects|PyZipFile 对象]] |
− | ** [[../zipfile#zipinfo-objects|ZipInfo | + | ** [[../zipfile#zipinfo-objects|ZipInfo 对象]] |
− | ** [[../zipfile#command-line-interface| | + | ** [[../zipfile#command-line-interface|命令行界面]] |
− | *** [[../zipfile#command-line-options| | + | *** [[../zipfile#command-line-options|命令行选项]] |
− | ** [[../zipfile#decompression-pitfalls| | + | ** [[../zipfile#decompression-pitfalls|减压陷阱]] |
− | *** [[../zipfile#from-file-itself| | + | *** [[../zipfile#from-file-itself|从文件本身]] |
− | *** [[../zipfile#file-system-limitations| | + | *** [[../zipfile#file-system-limitations|文件系统限制]] |
− | *** [[../zipfile#resources-limitations| | + | *** [[../zipfile#resources-limitations|资源限制]] |
− | *** [[../zipfile#interruption| | + | *** [[../zipfile#interruption|中断]] |
− | *** [[../zipfile#default-behaviors-of-extraction| | + | *** [[../zipfile#default-behaviors-of-extraction|提取的默认行为]] |
− | * [[../tarfile|<code>tarfile</code> | + | * [[../tarfile|<code>tarfile</code> — 读写 tar 归档文件]] |
− | ** [[../tarfile#tarfile-objects|TarFile | + | ** [[../tarfile#tarfile-objects|TarFile 对象]] |
− | ** [[../tarfile#tarinfo-objects|TarInfo | + | ** [[../tarfile#tarinfo-objects|TarInfo 对象]] |
− | ** [[../tarfile#command-line-interface| | + | ** [[../tarfile#command-line-interface|命令行界面]] |
− | *** [[../tarfile#command-line-options| | + | *** [[../tarfile#command-line-options|命令行选项]] |
− | ** [[../tarfile#examples| | + | ** [[../tarfile#examples|例子]] |
− | ** [[../tarfile#supported-tar-formats| | + | ** [[../tarfile#supported-tar-formats|支持的 tar 格式]] |
− | ** [[../tarfile#unicode-issues|Unicode | + | ** [[../tarfile#unicode-issues|Unicode 问题]] |
第53行: | 第51行: | ||
</div> | </div> | ||
+ | <div class="clearer"> | ||
− | [[Category:Python 3.9 | + | |
+ | |||
+ | </div> | ||
+ | |||
+ | [[Category:Python 3.9 文档]] |
2021年10月31日 (日) 04:51的最新版本
数据压缩和归档
本章中描述的模块支持使用 zlib、gzip、bzip2 和 lzma 算法进行数据压缩,以及创建 ZIP 和 tar 格式的档案。 另见 归档操作 由 shutil 模块提供。