f _@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 Jt|t|fSNr)zlibcompressleninputerrorsr -/usr/lib64/python3.10/encodings/zlib_codec.py zlib_encode s r cCs|dks Jt|t|fSr)r decompressrrr r r zlib_decodes rc@s eZdZdddZdddZdS) CodecrcCs t||SN)r selfrr 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 J||_t|_dSr)r r compressobjrr r r r __init__s zIncrementalEncoder.__init__FcCs*|r|j|}||jS|j|Sr)rrflushrrfinalcr 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 J||_t|_dSr)r r decompressobjrr r r r,s zIncrementalDecoder.__init__FcCs*|r|j|}||jS|j|Sr)r#r rrr 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 getregentryCsr1)r)r) __doc__r/rr rrrr"r$r(r1r r r r s