ok
Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/usr/lib64/python2.7/encodings/ |
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/usr/lib64/python2.7/encodings/bz2_codec.pyc |
� ^цdc @ s� d Z d d l Z d d l Z d d � Z d d � Z d e j f d � � YZ d e j f d � � YZ d e j f d � � YZ d e e j f d � � YZ d e e j f d � � YZ d � Z d S( 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����Nt strictc C s1 | d k s t � t j | � } | t | � f S( 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 ( t AssertionErrort bz2t compresst len( t inputt errorst output( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyt bz2_encode s c C s1 | d k s t � t j | � } | t | � f S( 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 ( R R t decompressR ( R R R ( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyt bz2_decode s t Codecc B s e Z d d � Z d d � Z RS( R c C s t | | � S( N( R ( t selfR R ( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyt encode1 s c C s t | | � S( N( R ( R R R ( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyt decode3 s ( t __name__t __module__R R ( ( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyR / s t IncrementalEncoderc B s) e Z d d � Z e d � Z d � Z RS( R c C s. | d k s t � | | _ t j � | _ d S( NR ( R R R t BZ2Compressort compressobj( R R ( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyt __init__7 s c C s= | r) | j j | � } | | j j � S| j j | � Sd S( N( R R t flush( R R t finalt c( ( s+ /usr/lib64/python2.7/encodings/bz2_codec.pyR <