Giter Club home page Giter Club logo

bz2file's Introduction

Bz2file is a Python library for reading and writing bzip2-compressed files.

It contains a drop-in replacement for the file interface in the standard library's bz2 module, including features from the latest development version of CPython that are not available in older releases.

Bz2file is compatible with CPython 2.6, 2.7, and 3.0 through 3.4, as well as PyPy 2.0.

Features

  • Supports multi-stream files.
  • Can read from or write to any file-like object.
  • Can open files in either text or binary mode.
  • Added methods: peek(), read1(), readinto(), fileno(), readable(), writable(), seekable().

Installation

To install bz2file, run: :

$ pip install bz2file

Documentation

The open() function and BZ2File class in this module provide the same features and interface as the ones in the standard library's bz2 module in the current development version of CPython, documented here.

Version History

0.98: 19 January 2014

  • Added support for the 'x' family of modes.
  • Ignore non-bz2 data at the end of a file, rather than raising an exception.
  • Tests now pass on PyPy.

0.95: 08 October 2012

  • Added the open() function.
  • Improved performance when reading in small chunks.
  • Removed the fileobj argument to BZ2File(). To wrap an existing file object, pass it as the first argument (filename).

0.9: 04 February 2012

  • Initial release.

bz2file's People

Contributors

nvawda avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.