ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Library Reference
7. Optional Operating System Services
7.1 signal -- Set handlers for asynchronous events
7.2 socket -- Low-level networking interface
7.3 select -- Waiting for I/O completion
7.4 thread -- Multiple threads of control
7.5 threading -- Higher-level threading interface
7.6 dummy thread -- Drop-in replacement for the thread module
7.7 dummy threading -- Drop-in replacement for the threading module
7.8 Queue -- A synchronized queue class
7.9 mmap -- Memory-mapped file support
7.10 anydbm -- Generic access to DBM-style databases
7.11 dbhash -- DBM-style interface to the BSD database library
7.12 whichdb -- Guess which DBM module created a database
7.13 bsddb -- Interface to Berkeley DB library
7.14 dumbdbm -- Portable DBM implementation
7.15 zlib -- Compression compatible with gzip
7.16 gzip -- Support for gzip files
7.17 bz2 -- Compression compatible with bzip2
7.17.1 (De)compression of files
7.17.2 Sequential (de)compression
7.17.3 One-shot (de)compression
7.18 zipfile -- Work with ZIP archives
7.19 tarfile -- Read and write tar archive files
7.20 readline -- GNU readline interface
7.21 rlcompleter -- Completion function for GNU readline

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Library Reference >> 7. Optional Operating System Services
ActivePython 2.4 documentation

7.17 bz2 -- Compression compatible with bzip2

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;



See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved