Python logo

上個主題

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

下個主題

compression 套件

此頁面

  • 回報錯誤
  • 顯示原始碼

導航

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

資料壓縮與保存¶

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

  • compression 套件
  • compression.zstd --- 與 Zstandard 格式相容的壓縮
    • 例外
    • Reading and writing compressed files
    • Compressing and decompressing data in memory
    • Zstandard 字典
    • Advanced parameter control
    • Miscellaneous
    • 範例
  • 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 物件
    • PyZipFile 物件
    • ZipInfo 物件
    • 命令列介面
      • 命令列選項
    • 解壓縮的陷阱
      • 來自檔案本身
      • 檔案系統限制
      • 資源限制
      • 中斷
      • 解壓縮的預設行為
  • tarfile --- 讀取與寫入 tar 封存檔案
    • TarFile 物件
    • TarInfo 物件
    • Extraction filters
      • Default named filters
      • Filter errors
      • Hints for further verification
      • Supporting older Python versions
      • Stateful extraction filter example
    • 命令列介面
      • 命令列選項
    • 範例
      • Reading examples
      • Writing examples
    • 支援的 tar 格式
    • Unicode issues

上個主題

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

下個主題

compression 套件

此頁面

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

導航

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.14.0rc3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 資料壓縮與保存
  • |
  • |
© 版權所有 2001 Python Software Foundation.
此頁面採用 Python 軟體基金會授權條款第 2 版。
文件中的範例、應用技巧與其他程式碼額外採用了 Zero Clause BSD 授權條款。
更多訊息請見歷史與授權條款。

Python 軟體基金會是一家非營利法人。 敬請捐贈。

最後更新於 9月 23, 2025 (00:19 UTC)。 發現 bug?
以 Sphinx8.2.3建立。