Your IP : 3.144.252.243


Current Path : /opt/alt/python27/lib64/python2.7/encodings/
Upload File :
Current File : //opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyc

�
^
bc@s�dZddlZddlZdd�Zdd�Zdejfd��YZdejfd	��YZd
ejfd��YZdeejfd
��YZdeej	fd��YZ	d�Z
dS(s2 Python 'bz2_codec' Codec - bz2 compression encoding

    Unlike most of the other codecs which target Unicode, this codec
    will return Python string objects for both encode and decode.

    Adapted by Raymond Hettinger from zlib_codec.py which was written
    by Marc-Andre Lemburg (mal@lemburg.com).

i����NtstrictcCs1|dkst�tj|�}|t|�fS(s Encodes the object input and returns a tuple (output
        object, length consumed).

        errors defines the error handling to apply. It defaults to
        'strict' handling which is the only currently supported
        error handling for this codec.

    R(tAssertionErrortbz2tcompresstlen(tinputterrorstoutput((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyt
bz2_encodes
cCs1|dkst�tj|�}|t|�fS(s� Decodes the object input and returns a tuple (output
        object, length consumed).

        input must be an object which provides the bf_getreadbuf
        buffer slot. Python strings, buffer objects and memory
        mapped files are examples of objects providing this slot.

        errors defines the error handling to apply. It defaults to
        'strict' handling which is the only currently supported
        error handling for this codec.

    R(RRt
decompressR(RRR((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyt
bz2_decodestCodeccBs eZdd�Zdd�ZRS(RcCs
t||�S(N(R(tselfRR((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pytencode1scCs
t||�S(N(R
(RRR((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pytdecode3s(t__name__t
__module__R
R(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyR/stIncrementalEncodercBs)eZdd�Zed�Zd�ZRS(RcCs.|dkst�||_tj�|_dS(NR(RRRt
BZ2Compressortcompressobj(RR((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyt__init__7s	cCs=|r)|jj|�}||jj�S|jj|�SdS(N(RRtflush(RRtfinaltc((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyR
<scCstj�|_dS(N(RRR(R((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pytresetCs(RRRtFalseR
R(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyR6stIncrementalDecodercBs)eZdd�Zed�Zd�ZRS(RcCs.|dkst�||_tj�|_dS(NR(RRRtBZ2Decompressort
decompressobj(RR((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyRGs	cCs-y|jj|�SWntk
r(dSXdS(Nt(RR	tEOFError(RRR((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyRLs
cCstj�|_dS(N(RRR(R((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyRRs(RRRRRR(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyRFstStreamWritercBseZRS((RR(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyRUstStreamReadercBseZRS((RR(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyR XscCs:tjdddtdtdtdtdtdtd	t�S(
NtnameRR
Rtincrementalencodertincrementaldecodertstreamwritertstreamreadert_is_text_encoding(	tcodecst	CodecInfoRR
RRRR R(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pytgetregentry]s	(t__doc__R'RRR
RRRRR R)(((s8/opt/alt/python27/lib64/python2.7/encodings/bz2_codec.pyt<module>	s

?>