iT邦幫忙

2025 iThome 鐵人賽

DAY 23
0
自我挑戰組

Python 函式大全系列 第 23

Python 模組概說 《 bz2 模組 》

  • 分享至 

  • xImage
  •  

✦ 功能:提供與 bzip2 壓縮演算法相容的資料壓縮/解壓縮功能,是一種無損資料壓縮方法

✦ 屬性與方法 :

bz2.compress(data, compresslevel=9)

說明:對整塊 bytes 資料做壓縮,壓縮級別 compresslevel 範圍為 1 到 9

bz2.decompress(data)

說明:對已壓縮的 bytes 資料做解壓縮,回傳還原後的 bytes

BZ2Compressor

說明:用於串流(streaming)壓縮

BZ2Decompressor

說明:用於串流(streaming)解壓縮

https://ithelp.ithome.com.tw/upload/images/20251005/20177993XwwGTU7h5a.jpg


上一篇
Python 模組概說 《 bisect 模組 》
下一篇
Python 模組概說 《 calendar 模組 》
系列文
Python 函式大全26
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言