uTools-Manuals/docs/python/archiving.html
2019-04-08 23:22:26 +08:00

1 line
5.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="body" role="main"><div class="section" id="data-compression-and-archiving"><h1><span class="yiyi-st" id="yiyi-9">13. </span><span class="yiyi-st" id="yiyi-10">数据压缩和归档</span></h1><p><span class="yiyi-st" id="yiyi-11">本章中描述的模块支持使用zlibgzipbzip2和lzma算法进行数据压缩以及创建ZIP和tar格式的归档。</span><span class="yiyi-st" id="yiyi-12">另请参阅<a class="reference internal" href="shutil.html#module-shutil" title="shutil: High-level file operations, including copying."><code class="xref py py-mod docutils literal"><span class="pre">shutil</span></code></a>模块提供的<a class="reference internal" href="shutil.html#archiving-operations"><span>Archiving operations</span></a></span></p><div class="toctree-wrapper compound"><ul><li class="toctree-l1"><span class="yiyi-st" id="yiyi-13"><a class="reference internal" href="zlib.html">13.1. <code class="docutils literal"><span class="pre">zlib</span></code> - 与<strong class="program">gzip</strong></a>兼容的压缩</span></li><li class="toctree-l1"><span class="yiyi-st" id="yiyi-15"><a class="reference internal" href="gzip.html">13.2. <code class="docutils literal"><span class="pre">gzip</span></code> - 支持<strong class="program">gzip</strong>文件</a></span><ul><li class="toctree-l2"><span class="yiyi-st" id="yiyi-14"><a class="reference internal" href="gzip.html#examples-of-usage">13.2.1.使用示例</a></span></li></ul></li><li class="toctree-l1"><span class="yiyi-st" id="yiyi-19"><a class="reference internal" href="bz2.html">13.3. <code class="docutils literal"><span class="pre">bz2</span></code> - 支持<strong class="program">bzip2</strong>压缩</a></span><ul><li class="toctree-l2"><span class="yiyi-st" id="yiyi-16"><a class="reference internal" href="bz2.html#de-compression-of-files">13.3.1. De压缩文件</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-17"><a class="reference internal" href="bz2.html#incremental-de-compression">13.3.2.增量de压缩</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-18"><a class="reference internal" href="bz2.html#one-shot-de-compression">13.3.3.单次de压缩</a></span></li></ul></li><li class="toctree-l1"><span class="yiyi-st" id="yiyi-25"><a class="reference internal" href="lzma.html">13.4. <code class="docutils literal"><span class="pre">lzma</span></code> - 使用LZMA算法压缩</a></span><ul><li class="toctree-l2"><span class="yiyi-st" id="yiyi-20"><a class="reference internal" href="lzma.html#reading-and-writing-compressed-files">13.4.1.读取和写入压缩文件</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-21"><a class="reference internal" href="lzma.html#compressing-and-decompressing-data-in-memory">13.4.2.压缩和解压缩存储器中的数据</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-22"><a class="reference internal" href="lzma.html#miscellaneous">13.4.3.杂项</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-23"><a class="reference internal" href="lzma.html#specifying-custom-filter-chains">13.4.4.指定自定义过滤器链</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-24"><a class="reference internal" href="lzma.html#examples">13.4.5.示例</a></span></li></ul></li><li class="toctree-l1"><span class="yiyi-st" id="yiyi-29"><a class="reference internal" href="zipfile.html">13.5. <code class="docutils literal"><span class="pre">zipfile</span></code> - 使用ZIP存档</a></span><ul><li class="toctree-l2"><span class="yiyi-st" id="yiyi-26"><a class="reference internal" href="zipfile.html#zipfile-objects"> 13.5.1. ZipFile对象</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-27"><a class="reference internal" href="zipfile.html#pyzipfile-objects">13.5.2. PyZipFile对象</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-28"><a class="reference internal" href="zipfile.html#zipinfo-objects">13.5.3. ZipInfo对象</a></span></li></ul></li><li class="toctree-l1"><span class="yiyi-st" id="yiyi-37"><a class="reference internal" href="tarfile.html">13.6. <code class="docutils literal"><span class="pre">tarfile</span></code> - 读取和写入tar存档文件</a></span><ul><li class="toctree-l2"><span class="yiyi-st" id="yiyi-30"><a class="reference internal" href="tarfile.html#tarfile-objects">13.6.1. TarFile对象</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-31"><a class="reference internal" href="tarfile.html#tarinfo-objects">13.6.2. TarInfo对象</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-33"><a class="reference internal" href="tarfile.html#command-line-interface">13.6.3.命令行接口</a></span><ul><li class="toctree-l3"><span class="yiyi-st" id="yiyi-32"><a class="reference internal" href="tarfile.html#command-line-options">13.6.3.1.命令行选项</a></span></li></ul></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-34"><a class="reference internal" href="tarfile.html#examples">13.6.4.示例</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-35"><a class="reference internal" href="tarfile.html#supported-tar-formats">13.6.5.支持的tar格式</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-36"><a class="reference internal" href="tarfile.html#unicode-issues">13.6.6. Unicode问题</a></span></li></ul></li></ul></div></div></div>