Python - Data Compression



Python's standard library has a rich collection of modules for data compression and archiving. One can select whichever is suitable for his job.

There are following modules related to data compression −

Sr.No. Module & Description

1

zlib

Compression compatible with gzip.

2

gzip

Support for gzip files.

3

bz2

Support for bz2 compression.

4

lzma

Compression using the LZMA algorithm.

5

zipfile

Work with ZIP archives.

6

tarfilev

Read and write tar archive files.

Advertisements