ó
    lQjC  ã                   ó�  • S r SSKJrJr  SSKrSSKrSSKrSSKrSSKr\R                  S:¼  a  SSK
Jr  OSSKJr  \R                  R                  SS5      R!                  5       r\S:X  aC  \R$                  " 5       S	;   a  S
SK7  SrOj\R$                  " 5       S;   a  S
SK7  SrOM S
SK7  SrOD\S:X  a	   S
SK7  SrO5\S:X  a  S
SK7  SrO'\S:X  a  S
SK7  SrO\S:X  a  S
SK7  SrO\" S\-  5      eSrSrS
rSr       SS jrSS\S\S\4S jjrSS\S\S\4S jjr g! \ a
    S
SK7  Sr N>f = f! \ a
    S
SK7  Sr NQf = f)z=Python interface to the Zstandard (zstd) compression library.é    )Úabsolute_importÚunicode_literalsN)é   é   )ÚBuffer)Ú
ByteStringÚPYTHON_ZSTANDARD_IMPORT_POLICYÚdefault)ÚCPythoné   )Ú*Úcext)ÚPyPyÚcffiÚcffi_fallbackÚrustzKunknown module import policy: %s; use default, cffi_fallback, cext, or cffiz0.25.0é   c                 óò  • UR                  SS5      nUS;   a  U=(       d
    [        5       nSn	Sn
OSUS;   a3  U=(       d
    [        5       nSn	Un
U
R                  S5      (       d  U
S-   n
O[	        S	R                  U5      5      e[        [        S
5      (       a  [        [        [        R                  4nO[        [        4n[        X5      (       a  [        R                  " X
5      nSnO;[        U S5      (       d  [        U S5      (       a  U n[        U5      nO[        S5      eU	S:X  a  UR!                  XÇS9nO!U	S:X  a  UR#                  XÇS9nO[%        S5      eSU;  a  [&        R(                  " XÔXVS9$ U$ )aI  Create a file object with zstd (de)compression.

The object returned from this function will be a
:py:class:`ZstdDecompressionReader` if opened for reading in binary mode,
a :py:class:`ZstdCompressionWriter` if opened for writing in binary mode,
or an ``io.TextIOWrapper`` if opened for reading or writing in text mode.

:param filename:
   ``bytes``, ``str``, or ``os.PathLike`` defining a file to open or a
   file object (with a ``read()`` or ``write()`` method).
:param mode:
   ``str`` File open mode. Accepts any of the open modes recognized by
   ``open()``.
:param cctx:
   ``ZstdCompressor`` to use for compression. If not specified and file
   is opened for writing, the default ``ZstdCompressor`` will be used.
:param dctx:
   ``ZstdDecompressor`` to use for decompression. If not specified and file
   is opened for reading, the default ``ZstdDecompressor`` will be used.
:param encoding:
    ``str`` that defines text encoding to use when file is opened in text
    mode.
:param errors:
   ``str`` defining text encoding error handling mode.
:param newline:
   ``str`` defining newline to use in text mode.
:param closefd:
   ``bool`` whether to close the file when the returned object is closed.
    Only used if a file object is passed. If a filename is specified, the
    opened file is always closed when the returned object is closed.
ÚtÚ )ÚrÚrbr   r   )ÚwÚwbÚaÚabÚxÚxbr   ÚbzInvalid mode: {!r}ÚPathLikeTÚreadÚwritez6filename must be a str, bytes, file or PathLike object)Úclosefdz2logic error in zstandard.open() handling open mode)ÚencodingÚerrorsÚnewline)ÚreplaceÚZstdDecompressorÚZstdCompressorÚendswithÚ
ValueErrorÚformatÚhasattrÚosÚstrÚbytesr    Ú
isinstanceÚbuiltinsÚopenÚboolÚ	TypeErrorÚstream_readerÚstream_writerÚRuntimeErrorÚioÚTextIOWrapper)ÚfilenameÚmodeÚcctxÚdctxr$   r%   r&   r#   Únormalized_modeÚ	open_modeÚraw_open_modeÚtypesÚinner_fhÚfhs                 ÚO/home/mande/repo/quber/.venv/lib/python3.13/site-packages/zstandard/__init__.pyr3   r3   a   sn  € ðR —l‘l 3¨Ó+€Oà˜+Ó%Ø×)Ô'Ó)ˆØˆ	Ø‰Ø	Ð=Ó	=Ø×'”~Ó'ˆØˆ	Ø'ˆØ×%Ñ% c×*Ñ*Ø)¨CÑ/ˆMøäÐ-×4Ñ4°TÓ:Ó;Ð;äŒr�:×ÑÜ”eœRŸ[™[Ð)‰ä”e�ˆä�(×"Ñ"Ü—=’= Ó9ˆØ‰Ü	�˜6×	"Ñ	"¤g¨h¸×&@Ñ&@ØˆÜ�w“-‰äØDó
ð 	
ð �CÓØ×Ñ ÐÐ:‰Ø	�cÓ	Ø×Ñ ÐÐ:‰äÐOÓPÐPà
�/Ó!Ü×ÒØ¨&ñ
ð 	
ð ˆ	ó    ÚdataÚlevelÚreturnc                 ó6   • [        US9nUR                  U 5      $ )a¬  Compress source data using the zstd compression format.

This performs one-shot compression using basic/default compression
settings.

This method is provided for convenience and is equivalent to calling
``ZstdCompressor(level=level).compress(data)``.

If you find yourself calling this function in a tight loop,
performance will be greater if you construct a single ``ZstdCompressor``
and repeatedly call ``compress()`` on it.
)rH   )r)   Úcompress)rG   rH   r=   s      rE   rK   rK   ¸   s   € ô  Ñ&€Dà�=‰=˜ÓÐrF   Úmax_output_sizec                 ó4   • [        5       nUR                  XS9$ )aÄ  Decompress a zstd frame into its original data.

This performs one-shot decompression using basic/default compression
settings.

This method is provided for convenience and is equivalent to calling
``ZstdDecompressor().decompress(data, max_output_size=max_output_size)``.

If you find yourself calling this function in a tight loop, performance
will be greater if you construct a single ``ZstdDecompressor`` and
repeatedly call ``decompress()`` on it.
)rL   )r(   Ú
decompress)rG   rL   r>   s      rE   rN   rN   Ê   s   € ô Ó€Dà�?‰?˜4ˆ?ÐAÐArF   )r   NNNNNN)r   )r   )!Ú__doc__Ú
__future__r   r   r2   r9   r.   ÚplatformÚsysÚversion_infoÚcollections.abcr   Útypingr   ÚenvironÚgetÚstripÚ_module_policyÚpython_implementationÚ	backend_cÚbackendÚbackend_cffiÚImportErrorÚbackend_rustÚ__version__Ú_MODE_CLOSEDÚ
_MODE_READÚ_MODE_WRITEr3   Úintr0   rK   rN   © rF   rE   Ú<module>rf      s   ðñ Dç 8ó Û 	Û 	Û Û 
à×Ñ�wÓÞ&å+ð —‘—‘Ø$ ióç�%ƒ'ð ð �YÓØ×%Ò%Ó'¨<Ó7Ü à‰Ø	×	'Ò	'Ó	)¨YÓ	6Ü#à‰ð	Ü$à‰Gð
 �Ó&ðÜ à‰ð
 �vÓÜà�GØ�vÓÜà�GØ�vÓÜà�Gá
ð	Ø(ñ	)óð ð €à€Ø€
Ø€ð
 
Ø	Ø	ØØØØôTñn�6ð  #ð ¨eõ ñ$B�Vð B¨cð B¸%ö Bøða ó 	Ü'àŠGð	ûð ó Ü#àŠðús$   Â'D" Â6D5 Ä"D2Ä1D2Ä5EÅE