type BZ2Compressor
object --+
|
BZ2Compressor
BZ2Compressor([compresslevel=9]) -> compressor object
Create a new compressor object. This object may be used to compress
data sequentially. If you want to compress data in one shot, use the
compress() function instead. The compresslevel parameter, if given, must
be a number between 1 and 9.
|
|
|
|
|
|
|
compressor object
|
__init__(compresslevel=9)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
|
a new object with type S, a subtype of T
|
|
|
|
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value |
|
|
|
string
|
compress(data)
Provide more data to the compressor object. |
|
|
|
string
|
flush()
Finish the compression process and return what is left in internal
buffers. |
|
|
|
x.__delattr__('name') <==> del x.name
- Overrides:
object.__delattr__
|
|
x.__getattribute__('name') <==> x.name
- Overrides:
object.__getattribute__
|
__init__(compresslevel=9)
(Constructor)
|
|
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
- Returns: compressor object
- Overrides:
object.__init__
|
- Returns: a new object with type S, a subtype of T
- Overrides:
object.__new__
|
|
x.__setattr__('name', value) <==> x.name = value
- Overrides:
object.__setattr__
|
|
Provide more data to the compressor object. It will return chunks of
compressed data whenever possible. When you've finished providing data to
compress, call the flush() method to finish the compression process, and
return what is left in the internal buffers.
- Returns: string
|
|
Finish the compression process and return what is left in internal
buffers. You must not use the compressor object after calling this
method.
- Returns: string
|