AlkantarClanX12
Current Path : /opt/alt/python34/lib64/python3.4/encodings/__pycache__/ |
Current File : //opt/alt/python34/lib64/python3.4/encodings/__pycache__/zlib_codec.cpython-34.pyc |
� j f� � @ s� d Z d d l Z d d l Z d d d � Z d d d � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e e j � Z Gd d � d e e j � Z d d � Z d S)z�Python 'zlib_codec' Codec - zlib compression encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). � N�strictc C s+ | d k s t � t j | � t | � f S)Nr )�AssertionError�zlib�compress�len)�input�errors� r �9/opt/alt/python34/lib64/python3.4/encodings/zlib_codec.py�zlib_encode s r c C s+ | d k s t � t j | � t | � f S)Nr )r r � decompressr )r r r r r �zlib_decode s r c @ s. e Z d Z d d d � Z d d d � Z d S)�Codecr c C s t | | � S)N)r )�selfr r r r r �encode s zCodec.encodec C s t | | � S)N)r )r r r r r r �decode s zCodec.decodeN)�__name__� __module__�__qualname__r r r r r r r s r c @ s: e Z d Z d d d � Z d d d � Z d d � Z d S) �IncrementalEncoderr c C s. | d k s t � | | _ t j � | _ d S)Nr )r r r �compressobj)r r r r r �__init__ s zIncrementalEncoder.__init__Fc C s= | r) | j j | � } | | j j � S| j j | � Sd S)N)r r �flush)r r �final�cr r r r ! s zIncrementalEncoder.encodec C s t j � | _ d S)N)r r )r r r r �reset( s zIncrementalEncoder.resetN)r r r r r r r r r r r s r c @ s: e Z d Z d d d � Z d d d � Z d d � Z d S) �IncrementalDecoderr c C s. | d k s t � | | _ t j � | _ d S)Nr )r r r � decompressobj)r r r r r r , s zIncrementalDecoder.__init__Fc C s= | r) | j j | � } | | j j � S| j j | � Sd S)N)r r r )r r r r r r r r 1 s zIncrementalDecoder.decodec C s t j � | _ d S)N)r r )r r r r r 8 s zIncrementalDecoder.resetN)r r r r r r r r r r r + s r c @ s e Z d Z e Z d S)�StreamWriterN)r r r �bytes�charbuffertyper r r r r ; s r c @ s e Z d Z e Z d S)�StreamReaderN)r r r r r r r r r r! >