U e5d@sdZddlZddlZdddZdddZGdd d ejZGd d d ejZGd d d ejZGdddeejZGdddeej Z ddZ dS)zPython 'zlib_codec' Codec - zlib compression encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). NstrictcCs|dks tt|t|fSNr)AssertionErrorzlibcompressleninputerrorsr ,/usr/lib64/python3.8/encodings/zlib_codec.py zlib_encode s r cCs|dks tt|t|fSr)rr decompressrrr r r zlib_decodes rc@s eZdZdddZdddZdS) CodecrcCs t||SN)r selfr r r r r encodesz Codec.encodecCs t||Sr)rrr r r decodesz Codec.decodeN)r)r)__name__ __module__ __qualname__rrr r r r rs rc@s(eZdZd ddZd ddZddZd S) IncrementalEncoderrcCs |dks t||_t|_dSr)rr r compressobjrr r r r __init__s zIncrementalEncoder.__init__FcCs.|r|j|}||jS|j|SdSr)rrflushrr finalcr r r r!s zIncrementalEncoder.encodecCst|_dSr)rrrr r r reset(szIncrementalEncoder.resetN)r)F)rrrrrr"r r r r rs  rc@s(eZdZd ddZd ddZddZd S) IncrementalDecoderrcCs |dks t||_t|_dSr)rr r decompressobjrr r r r,s zIncrementalDecoder.__init__FcCs.|r|j|}||jS|j|SdSr)r$rrrr r r r1s zIncrementalDecoder.decodecCst|_dSr)rr$r!r r r r"8szIncrementalDecoder.resetN)r)F)rrrrrr"r r r r r#+s  r#c@seZdZeZdS) StreamWriterNrrrbytescharbuffertyper r r r r%;sr%c@seZdZeZdS) StreamReaderNr&r r r r r)>sr)c CstjdttttttddS)NrF)namerrincrementalencoderincrementaldecoder streamreader streamwriter_is_text_encoding)codecs CodecInfor rrr#r)r%r r r r getregentryCsr2)r)r) __doc__r0rr rrrr#r%r)r2r r r r s