New in version 2.3.
This module provides a comprehensive interface for the bz2 compression library.
It implements a complete file interface, one-shot (de)compression functions,
and types for sequential (de)compression.
Here is a resume of the features offered by the bz2 module:
- BZ2File class implements a complete file interface, including
readline(), readlines(),
writelines(), seek(), etc;
- BZ2File class implements emulated seek() support;
- BZ2File class implements universal newline support;
- BZ2File class offers an optimized line iteration using
the readahead algorithm borrowed from file objects;
- Sequential (de)compression supported by BZ2Compressor and
BZ2Decompressor classes;
- One-shot (de)compression supported by compress() and
decompress() functions;
- Thread safety uses individual locking mechanism;
- Complete inline documentation;
Release 2.4.3, documentation updated on 29 March 2006.
See About this document... for information on suggesting changes.