🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](zlib.xhtml "zlib --- 与 gzip 兼容的压缩") | - [上一页](sqlite3.xhtml "sqlite3 --- SQLite 数据库 DB-API 2.0 接口模块") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | # 数据压缩和存档 本章中描述的模块支持 zlib、gzip、bzip2 和 lzma 数据压缩算法,以及创建 ZIP 和 tar 格式的归档文件。参见由 [`shutil`](shutil.xhtml#module-shutil "shutil: High-level file operations, including copying.") 模块提供的 [Archiving operations](shutil.xhtml#archiving-operations) 。 - [`zlib` --- 与 **gzip** 兼容的压缩](zlib.xhtml) - [`gzip` --- 对 **gzip** 格式的支持](gzip.xhtml) - [用法示例](gzip.xhtml#examples-of-usage) - [`bz2` --- 对 **bzip2** 压缩算法的支持](bz2.xhtml) - [文件压缩和解压](bz2.xhtml#de-compression-of-files) - [增量压缩和解压](bz2.xhtml#incremental-de-compression) - [一次性压缩或解压](bz2.xhtml#one-shot-de-compression) - [用法示例](bz2.xhtml#examples-of-usage) - [`lzma` --- 用 LZMA 算法压缩](lzma.xhtml) - [Reading and writing compressed files](lzma.xhtml#reading-and-writing-compressed-files) - [Compressing and decompressing data in memory](lzma.xhtml#compressing-and-decompressing-data-in-memory) - [杂项](lzma.xhtml#miscellaneous) - [Specifying custom filter chains](lzma.xhtml#specifying-custom-filter-chains) - [示例](lzma.xhtml#examples) - [`zipfile` --- 在 ZIP 归档中工作](zipfile.xhtml) - [ZipFile 对象](zipfile.xhtml#zipfile-objects) - [PyZipFile Objects](zipfile.xhtml#pyzipfile-objects) - [ZipInfo Objects](zipfile.xhtml#zipinfo-objects) - [命令行界面](zipfile.xhtml#command-line-interface) - [命令行选项](zipfile.xhtml#command-line-options) - [`tarfile` --- Read and write tar archive files](tarfile.xhtml) - [TarFile Objects](tarfile.xhtml#tarfile-objects) - [TarInfo Objects](tarfile.xhtml#tarinfo-objects) - [命令行界面](tarfile.xhtml#command-line-interface) - [命令行选项](tarfile.xhtml#command-line-options) - [示例](tarfile.xhtml#examples) - [Supported tar formats](tarfile.xhtml#supported-tar-formats) - [Unicode issues](tarfile.xhtml#unicode-issues) ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](zlib.xhtml "zlib --- 与 gzip 兼容的压缩") | - [上一页](sqlite3.xhtml "sqlite3 --- SQLite 数据库 DB-API 2.0 接口模块") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。