_bz2 - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


_bz2
NAME MODULE REFERENCE CLASSES FILE
Help on module _bz2:

NAME
    _bz2

MODULE REFERENCE
    https://docs.python.org/3.10/library/_bz2.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

CLASSES
    builtins.object
        BZ2Compressor
        BZ2Decompressor

    class BZ2Compressor(builtins.object)
     |  BZ2Compressor(compresslevel=9, /)
     |
     |  Create a compressor object for compressing data incrementally.
     |
     |    compresslevel
     |      Compression level, as a number between 1 and 9.
     |
     |  For one-shot compression, use the compress() function instead.
     |
     |  Methods defined here:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  compress(self, data, /)
     |      Provide data to the compressor object.
     |
     |      Returns a chunk of compressed data if possible, or b'' otherwise.
     |
     |      When you have finished providing data to the compressor, call the
     |      flush() method to finish the compression process.
     |
     |  flush(self, /)
     |      Finish the compression process.
     |
     |      Returns the compressed data left in internal buffers.
     |
     |      The compressor object may not be used after this method is called.
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.

    class BZ2Decompressor(builtins.object)
     |  Create a decompressor object for decompressing data incrementally.
     |
     |  For one-shot decompression, use the decompress() function instead.
     |
     |  Methods defined here:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  decompress(self, /, data, max_length=-1)
     |      Decompress *data*, returning uncompressed data as bytes.
     |
     |      If *max_length* is nonnegative, returns at most *max_length* bytes of
     |      decompressed data. If this limit is reached and further output can be
     |      produced, *self.needs_input* will be set to ``False``. In this case, the next
     |      call to *decompress()* may provide *data* as b'' to obtain more of the output.
     |
     |      If all of the input data was decompressed and returned (either because this
     |      was less than *max_length* bytes, or because *max_length* was negative),
     |      *self.needs_input* will be set to True.
     |
     |      Attempting to decompress data after the end of stream is reached raises an
     |      EOFError.  Any data found after the end of the stream is ignored and saved in
     |      the unused_data attribute.
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  eof
     |      True if the end-of-stream marker has been reached.
     |
     |  needs_input
     |      True if more input is needed before more decompressed data can be produced.
     |
     |  unused_data
     |      Data found after the end of the compressed stream.

FILE
    /usr/lib/python3.10/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so



Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:14 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top