1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
<html xmlns="http://www.w3.org/1999/xhtml">
7
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
<title>13. Data Compression and Archiving — Python 3.5.2 documentation</title>
11
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
12
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
14
<script type="text/javascript">
15
var DOCUMENTATION_OPTIONS = {
18
COLLAPSE_INDEX: false,
23
<script type="text/javascript" src="../_static/jquery.js"></script>
24
<script type="text/javascript" src="../_static/underscore.js"></script>
25
<script type="text/javascript" src="../_static/doctools.js"></script>
26
<script type="text/javascript" src="../_static/sidebar.js"></script>
27
<link rel="search" type="application/opensearchdescription+xml"
28
title="Search within Python 3.5.2 documentation"
29
href="../_static/opensearch.xml"/>
30
<link rel="author" title="About these documents" href="../about.html" />
31
<link rel="copyright" title="Copyright" href="../copyright.html" />
32
<link rel="top" title="Python 3.5.2 documentation" href="../contents.html" />
33
<link rel="up" title="The Python Standard Library" href="index.html" />
34
<link rel="next" title="13.1. zlib — Compression compatible with gzip" href="zlib.html" />
35
<link rel="prev" title="12.6. sqlite3 — DB-API 2.0 interface for SQLite databases" href="sqlite3.html" />
36
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
38
<script type="text/javascript" src="../_static/copybutton.js"></script>
39
<script type="text/javascript" src="../_static/version_switch.js"></script>
45
<body role="document">
46
<div class="related" role="navigation" aria-label="related navigation">
49
<li class="right" style="margin-right: 10px">
50
<a href="../genindex.html" title="General Index"
51
accesskey="I">index</a></li>
53
<a href="../py-modindex.html" title="Python Module Index"
56
<a href="zlib.html" title="13.1. zlib — Compression compatible with gzip"
57
accesskey="N">next</a> |</li>
59
<a href="sqlite3.html" title="12.6. sqlite3 — DB-API 2.0 interface for SQLite databases"
60
accesskey="P">previous</a> |</li>
61
<li><img src="../_static/py.png" alt=""
62
style="vertical-align: middle; margin-top: -1px"/></li>
63
<li><a href="https://www.python.org/">Python</a> »</li>
65
<span class="version_switcher_placeholder">3.5.2</span>
66
<a href="../index.html">Documentation </a> »
69
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Python Standard Library</a> »</li>
73
<div class="inline-search" style="display: none" role="search">
74
<form class="inline-search" action="../search.html" method="get">
75
<input placeholder="Quick search" type="text" name="q" />
76
<input type="submit" value="Go" />
77
<input type="hidden" name="check_keywords" value="yes" />
78
<input type="hidden" name="area" value="default" />
81
<script type="text/javascript">$('.inline-search').show(0);</script>
88
<div class="document">
89
<div class="documentwrapper">
90
<div class="bodywrapper">
91
<div class="body" role="main">
93
<div class="section" id="data-compression-and-archiving">
94
<span id="archiving"></span><h1>13. Data Compression and Archiving<a class="headerlink" href="#data-compression-and-archiving" title="Permalink to this headline">¶</a></h1>
95
<p>The modules described in this chapter support data compression with the zlib,
96
gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-format
97
archives. See also <a class="reference internal" href="shutil.html#archiving-operations"><span>Archiving operations</span></a> provided by the <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>
99
<div class="toctree-wrapper compound">
101
<li class="toctree-l1"><a class="reference internal" href="zlib.html">13.1. <code class="docutils literal"><span class="pre">zlib</span></code> — Compression compatible with <strong class="program">gzip</strong></a></li>
102
<li class="toctree-l1"><a class="reference internal" href="gzip.html">13.2. <code class="docutils literal"><span class="pre">gzip</span></code> — Support for <strong class="program">gzip</strong> files</a><ul>
103
<li class="toctree-l2"><a class="reference internal" href="gzip.html#examples-of-usage">13.2.1. Examples of usage</a></li>
106
<li class="toctree-l1"><a class="reference internal" href="bz2.html">13.3. <code class="docutils literal"><span class="pre">bz2</span></code> — Support for <strong class="program">bzip2</strong> compression</a><ul>
107
<li class="toctree-l2"><a class="reference internal" href="bz2.html#de-compression-of-files">13.3.1. (De)compression of files</a></li>
108
<li class="toctree-l2"><a class="reference internal" href="bz2.html#incremental-de-compression">13.3.2. Incremental (de)compression</a></li>
109
<li class="toctree-l2"><a class="reference internal" href="bz2.html#one-shot-de-compression">13.3.3. One-shot (de)compression</a></li>
112
<li class="toctree-l1"><a class="reference internal" href="lzma.html">13.4. <code class="docutils literal"><span class="pre">lzma</span></code> — Compression using the LZMA algorithm</a><ul>
113
<li class="toctree-l2"><a class="reference internal" href="lzma.html#reading-and-writing-compressed-files">13.4.1. Reading and writing compressed files</a></li>
114
<li class="toctree-l2"><a class="reference internal" href="lzma.html#compressing-and-decompressing-data-in-memory">13.4.2. Compressing and decompressing data in memory</a></li>
115
<li class="toctree-l2"><a class="reference internal" href="lzma.html#miscellaneous">13.4.3. Miscellaneous</a></li>
116
<li class="toctree-l2"><a class="reference internal" href="lzma.html#specifying-custom-filter-chains">13.4.4. Specifying custom filter chains</a></li>
117
<li class="toctree-l2"><a class="reference internal" href="lzma.html#examples">13.4.5. Examples</a></li>
120
<li class="toctree-l1"><a class="reference internal" href="zipfile.html">13.5. <code class="docutils literal"><span class="pre">zipfile</span></code> — Work with ZIP archives</a><ul>
121
<li class="toctree-l2"><a class="reference internal" href="zipfile.html#zipfile-objects">13.5.1. ZipFile Objects</a></li>
122
<li class="toctree-l2"><a class="reference internal" href="zipfile.html#pyzipfile-objects">13.5.2. PyZipFile Objects</a></li>
123
<li class="toctree-l2"><a class="reference internal" href="zipfile.html#zipinfo-objects">13.5.3. ZipInfo Objects</a></li>
124
<li class="toctree-l2"><a class="reference internal" href="zipfile.html#command-line-interface">13.5.4. Command-Line Interface</a><ul>
125
<li class="toctree-l3"><a class="reference internal" href="zipfile.html#command-line-options">13.5.4.1. Command-line options</a></li>
130
<li class="toctree-l1"><a class="reference internal" href="tarfile.html">13.6. <code class="docutils literal"><span class="pre">tarfile</span></code> — Read and write tar archive files</a><ul>
131
<li class="toctree-l2"><a class="reference internal" href="tarfile.html#tarfile-objects">13.6.1. TarFile Objects</a></li>
132
<li class="toctree-l2"><a class="reference internal" href="tarfile.html#tarinfo-objects">13.6.2. TarInfo Objects</a></li>
133
<li class="toctree-l2"><a class="reference internal" href="tarfile.html#command-line-interface">13.6.3. Command-Line Interface</a><ul>
134
<li class="toctree-l3"><a class="reference internal" href="tarfile.html#command-line-options">13.6.3.1. Command-line options</a></li>
137
<li class="toctree-l2"><a class="reference internal" href="tarfile.html#examples">13.6.4. Examples</a></li>
138
<li class="toctree-l2"><a class="reference internal" href="tarfile.html#supported-tar-formats">13.6.5. Supported tar formats</a></li>
139
<li class="toctree-l2"><a class="reference internal" href="tarfile.html#unicode-issues">13.6.6. Unicode issues</a></li>
150
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
151
<div class="sphinxsidebarwrapper">
152
<h4>Previous topic</h4>
153
<p class="topless"><a href="sqlite3.html"
154
title="previous chapter">12.6. <code class="docutils literal"><span class="pre">sqlite3</span></code> — DB-API 2.0 interface for SQLite databases</a></p>
156
<p class="topless"><a href="zlib.html"
157
title="next chapter">13.1. <code class="docutils literal"><span class="pre">zlib</span></code> — Compression compatible with <strong class="program">gzip</strong></a></p>
158
<div role="note" aria-label="source link">
160
<ul class="this-page-menu">
161
<li><a href="../bugs.html">Report a Bug</a></li>
162
<li><a href="../_sources/library/archiving.txt"
163
rel="nofollow">Show Source</a></li>
168
<div class="clearer"></div>
170
<div class="related" role="navigation" aria-label="related navigation">
173
<li class="right" style="margin-right: 10px">
174
<a href="../genindex.html" title="General Index"
177
<a href="../py-modindex.html" title="Python Module Index"
180
<a href="zlib.html" title="13.1. zlib — Compression compatible with gzip"
183
<a href="sqlite3.html" title="12.6. sqlite3 — DB-API 2.0 interface for SQLite databases"
185
<li><img src="../_static/py.png" alt=""
186
style="vertical-align: middle; margin-top: -1px"/></li>
187
<li><a href="https://www.python.org/">Python</a> »</li>
189
<span class="version_switcher_placeholder">3.5.2</span>
190
<a href="../index.html">Documentation </a> »
193
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
197
<div class="inline-search" style="display: none" role="search">
198
<form class="inline-search" action="../search.html" method="get">
199
<input placeholder="Quick search" type="text" name="q" />
200
<input type="submit" value="Go" />
201
<input type="hidden" name="check_keywords" value="yes" />
202
<input type="hidden" name="area" value="default" />
205
<script type="text/javascript">$('.inline-search').show(0);</script>
212
© <a href="../copyright.html">Copyright</a> 2001-2016, Python Software Foundation.
214
The Python Software Foundation is a non-profit corporation.
215
<a href="https://www.python.org/psf/donations/">Please donate.</a>
217
Last updated on Nov 14, 2016.
218
<a href="../bugs.html">Found a bug</a>?
220
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
b'\\ No newline at end of file'