Python logo

上個主題

sqlite3 --- SQLite 資料庫的 DB-API 2.0 介面

下個主題

zlib --- 相容於 gzip 的壓縮

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.13.3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 資料壓縮與保存
  • |
  • |

資料壓縮與保存¶

本章中描述的模組支援使用 zlib、gzip、bzip2 和 lzma 演算法進行資料壓縮,以及建立 ZIP 和 tar 格式的存檔。另請參閱 shutil 模組提供的 Archiving operations。

  • zlib --- 相容於 gzip 的壓縮
  • gzip --- gzip 檔案的支援
    • 用法範例
    • 命令列介面
      • 命令列選項
  • bz2 --- bzip2 壓縮的支援
    • (De)compression of files
    • Incremental (de)compression
    • One-shot (de)compression
    • 用法範例
  • lzma --- 使用 LZMA 演算法進行壓縮
    • Reading and writing compressed files
    • Compressing and decompressing data in memory
    • Miscellaneous
    • Specifying custom filter chains
    • 範例
  • zipfile --- 處理 ZIP 封存檔案
    • ZipFile 物件
    • Path Objects
    • PyZipFile 物件
    • ZipInfo 物件
    • Command-Line Interface
      • Command-line options
    • Decompression pitfalls
      • From file itself
      • File System limitations
      • Resources limitations
      • Interruption
      • Default behaviors of extraction
  • tarfile --- 讀取與寫入 tar 封存檔案
    • TarFile 物件
    • TarInfo 物件
    • Extraction filters
      • Default named filters
      • Filter errors
      • Hints for further verification
      • Supporting older Python versions
      • Stateful extraction filter example
    • Command-Line Interface
      • 命令列選項
    • 範例
    • Supported tar formats
    • Unicode issues

上個主題

sqlite3 --- SQLite 資料庫的 DB-API 2.0 介面

下個主題

zlib --- 相容於 gzip 的壓縮

此頁面

  • 回報錯誤
  • 顯示原始碼
«

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.13.3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 資料壓縮與保存
  • |
  • |
© 版權 2001-2025, Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

最後更新於 5月 20, 2025 (03:13 UTC)。 Found a bug?
使用 Sphinx 8.2.3 建立。