ó
    &ÝNjz$  ã                   ó*  • S r SSKrS\R                  s=::  a  S:  d  O  \" S\R                   35      eSrSSKJs  Jr  SSK	r	SSKJ
r
JrJrJrJrJr  SSKJrJrJr  / \" \R*                  S	-  S	5      Q\R*                  S	-  P7r \S
:  a  \" S5      e\R.                  r  " S S5      rS rS rS rSS jrSS jr " S S\	R>                  5      r  " S S\	R>                  5      r! " S S\	R>                  5      r"\RF                  " \ \!5        S r$g)zGPython bindings to the Zstandard (zstd) compression library (RFC-8878).é    N)é   é
   )r   é   zUnsupported Python version: )ÚCOMPRESSION_LEVEL_DEFAULTÚcompressÚCompressionParameterÚ
decompressÚDecompressionParameterÚfinalize_dictÚget_frame_infoÚStrategyÚ
train_dictÚregister_shutilÚopenÚZstdFileÚget_frame_sizeÚzstd_versionÚzstd_version_infoÚZstdCompressorÚZstdDecompressorÚZstdDictÚ	ZstdError)r   r   r   r   r   r   )r   r   Ú_nbyteséd   )é   é   é   zzstd version is too oldc                   ó<   ^ • \ rS rSrSrSrU 4S jrS rS rSr	U =r
$ )Ú	FrameInfoé6   z$Information about a Zstandard frame.©Údecompressed_sizeÚdictionary_idc                 óF   >• [         TU ]  SU5        [         TU ]  SU5        g )Nr"   r#   )ÚsuperÚ__setattr__)Úselfr"   r#   Ú	__class__s      €ÚT/home/mande/repo/quber/.venv/lib/python3.13/site-packages/backports/zstd/__init__.pyÚ__init__ÚFrameInfo.__init__;   s#   ø€ Ü‰ÑÐ/Ð1BÔCÜ‰Ñ˜O¨]Õ;ó    c                 ó<   • SU R                    SU R                   S3$ )NzFrameInfo(decompressed_size=z, dictionary_id=Ú)r!   ©r'   s    r)   Ú__repr__ÚFrameInfo.__repr__?   s.   € Ø.¨t×/EÑ/EÐ.Fð G!Ø!%×!3Ñ!3Ð 4°Að7ð 	8r,   c                 ó    • [        SU< 35      e)Nzcan't set attribute )ÚAttributeError)r'   ÚnameÚ_s      r)   r&   ÚFrameInfo.__setattr__C   s   € ÜÐ3°D±8Ð<Ó=Ð=r,   © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r*   r0   r&   Ú__static_attributes__Ú__classcell__)r(   s   @r)   r   r   6   s   ø† Ù.à4€Iõ<ò8÷>ð >r,   r   c                 ó:   • [        [        R                  " U 5      6 $ )ay  Get Zstandard frame information from a frame header.

*frame_buffer* is a bytes-like object. It should start from the
beginning of a frame, and needs to include at least the frame header
(6 to 18 bytes).

The returned FrameInfo object has two attributes.
'decompressed_size' is the size in bytes of the data in the frame when
decompressed, or None when the decompressed size is unknown.
'dictionary_id' is an int in the range (0, 2**32). The special value 0
means that the dictionary ID was not recorded in the frame header,
the frame may or may not need a dictionary to be decoded,
and the ID of such a dictionary is not specified.
)r   Ú_zstdr   )Úframe_buffers    r)   r   r   G   s   € ô ”e×*Ò*¨<Ó8Ð9Ð9r,   c                 ó:  • [        U[        5      (       d%  [        U5      R                  n[	        SU< S35      e[        U 5      n SR                  U 5      n[        S U  5       5      nU(       d  [        S5      e[        R                  " X4U5      n[        U5      $ )zÙReturn a ZstdDict representing a trained Zstandard dictionary.

*samples* is an iterable of samples, where a sample is a bytes-like
object representing a file.

*dict_size* is the dictionary's maximum size, in bytes.
z%dict_size must be an int object, not Ú.r,   c              3   ó8   #   • U  H  n[        U5      v •  M     g 7f©N©r   ©Ú.0Úsamples     r)   Ú	<genexpr>Útrain_dict.<locals>.<genexpr>g   ó   é € Ð>²g¨Fœ Ÿ˜²gùó   ‚z2samples contained no data; can't train dictionary.)Ú
isinstanceÚintÚtyper:   Ú	TypeErrorÚtupleÚjoinÚ
ValueErrorrA   r   r   )ÚsamplesÚ	dict_sizeÚds_clsÚchunksÚchunk_sizesÚdict_contents         r)   r   r   Y   sˆ   € ô �i¤×%Ñ%Ü�i“×-Ñ-ˆÜÐ?À¹zÈÐKÓLÐLä�G‹n€GØ�X‰X�gÓ€FÜÑ>±gÓ>Ó>€KÞÜÐMÓNÐNÜ×#Ò# F¸ÓC€LÜ�LÓ!Ð!r,   c                óž  • [        U [        5      (       d  [        S5      e[        U[        5      (       d  [        S5      e[        U[        5      (       d  [        S5      e[	        U5      nSR                  U5      n[	        S U 5       5      nU(       d  [        S5      e[        R                  " U R                  UXRU5      n[        U5      $ )a  Return a ZstdDict representing a finalized Zstandard dictionary.

Given a custom content as a basis for dictionary, and a set of samples,
finalize *zstd_dict* by adding headers and statistics according to the
Zstandard dictionary format.

You may compose an effective dictionary content by hand, which is used
as basis dictionary, and use some samples to finalize a dictionary.  The
basis dictionary may be a "raw content" dictionary.  See *is_raw* in
ZstdDict.

*samples* is an iterable of samples, where a sample is a bytes-like
object representing a file.
*dict_size* is the dictionary's maximum size, in bytes.
*level* is the expected compression level. The statistics for each
compression level differ, so tuning the dictionary to the compression
level can provide improvements.
z/zstd_dict argument should be a ZstdDict object.z+dict_size argument should be an int object.z'level argument should be an int object.r,   c              3   ó8   #   • U  H  n[        U5      v •  M     g 7frF   rG   rH   s     r)   rK   Ú finalize_dict.<locals>.<genexpr>‹   rM   rN   z=The samples are empty content, can't finalize the dictionary.)
rO   r   rR   rP   rS   rT   rU   rA   r   r[   )Ú	zstd_dictrV   rW   ÚlevelrY   rZ   r[   s          r)   r   r   n   s¶   € ô( �i¤×*Ñ*ÜÐIÓJÐJÜ�i¤×%Ñ%ÜÐEÓFÐFÜ�eœS×!Ñ!ÜÐAÓBÐBä�G‹n€GØ�X‰X�gÓ€FÜÑ>±gÓ>Ó>€KÞÜð 'ó (ð 	(ä×&Ò& y×'=Ñ'=¸vØ'2¸uóF€Lä�LÓ!Ð!r,   c                 óR   • [        XUS9nUR                  U [         R                  S9$ )aÚ  Return Zstandard compressed *data* as bytes.

*level* is an int specifying the compression level to use, defaulting to
COMPRESSION_LEVEL_DEFAULT ('3').
*options* is a dict object that contains advanced compression
parameters. See CompressionParameter for more on options.
*zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary.
See the function train_dict for how to train a ZstdDict on sample data.

For incremental compression, use a ZstdCompressor instead.
)r`   Úoptionsr_   )Úmode)r   r   ÚFLUSH_FRAME)Údatar`   rb   r_   Úcomps        r)   r   r   ”   s)   € ô  À)ÑL€DØ�=‰=˜¤N×$>Ñ$>ˆ=Ð?Ð?r,   c                 óà   • / n [        X!S9nUR                  UR                  U 5      5        UR                  (       d  [	        S5      eUR
                  n U (       d  OM[  SR                  U5      $ )a‡  Decompress one or more frames of Zstandard compressed *data*.

*zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary.
See the function train_dict for how to train a ZstdDict on sample data.
*options* is a dict object that contains advanced compression
parameters. See DecompressionParameter for more on options.

For incremental decompression, use a ZstdDecompressor instead.
)rb   r_   zACompressed data ended before the end-of-stream marker was reachedr,   )r   Úappendr	   Úeofr   Úunused_datarT   )re   r_   rb   ÚresultsÚdecomps        r)   r	   r	   ¤   so   € ð €GØ
Ü!¨'ÑGˆØ�‰�v×(Ñ(¨Ó.Ô/Ø�z�zÜð ?ó @ð @à×!Ñ!ˆÞØñ ð �8‰8�GÓÐr,   c                   óæ  • \ rS rSrSr\R                  r\R                  r	\R                  r\R                  r\R                  r\R                   r\R$                  r\R(                  r\R,                  r\R0                  r\R4                  r\R8                  r\R<                  r\R@                  r!\RD                  r#\RH                  r%\RL                  r'\RP                  r)\RT                  r+S r,Sr-g)r   é»   zCompression parameters.c                 ó@   • [         R                  " U R                  SS9$ )zqReturn the (lower, upper) int bounds of a compression parameter.

Both the lower and upper bounds are inclusive.
T©Úis_compress©rA   Úget_param_boundsÚvaluer/   s    r)   ÚboundsÚCompressionParameter.boundsÕ   s   € ô
 ×%Ò% d§j¡j¸dÑCÐCr,   r7   N).r8   r9   r:   r;   r<   rA   ÚZSTD_c_compressionLevelÚcompression_levelÚZSTD_c_windowLogÚ
window_logÚZSTD_c_hashLogÚhash_logÚZSTD_c_chainLogÚ	chain_logÚZSTD_c_searchLogÚ
search_logÚZSTD_c_minMatchÚ	min_matchÚZSTD_c_targetLengthÚtarget_lengthÚZSTD_c_strategyÚstrategyÚ!ZSTD_c_enableLongDistanceMatchingÚenable_long_distance_matchingÚZSTD_c_ldmHashLogÚldm_hash_logÚZSTD_c_ldmMinMatchÚldm_min_matchÚZSTD_c_ldmBucketSizeLogÚldm_bucket_size_logÚZSTD_c_ldmHashRateLogÚldm_hash_rate_logÚZSTD_c_contentSizeFlagÚcontent_size_flagÚZSTD_c_checksumFlagÚchecksum_flagÚZSTD_c_dictIDFlagÚdict_id_flagÚZSTD_c_nbWorkersÚ
nb_workersÚZSTD_c_jobSizeÚjob_sizeÚZSTD_c_overlapLogÚoverlap_logru   r>   r7   r,   r)   r   r   »   sá   † Ù!à×5Ñ5ÐØ×'Ñ'€JØ×#Ñ#€HØ×%Ñ%€IØ×'Ñ'€JØ×%Ñ%€IØ×-Ñ-€MØ×$Ñ$€Hà$)×$KÑ$KÐ!Ø×*Ñ*€LØ×,Ñ,€MØ×7Ñ7ÐØ×3Ñ3Ðà×4Ñ4ÐØ×-Ñ-€MØ×*Ñ*€Là×'Ñ'€JØ×#Ñ#€HØ×)Ñ)€KõDr,   r   c                   ó6   • \ rS rSrSr\R                  rS rSr	g)r
   éÝ   zDecompression parameters.c                 ó@   • [         R                  " U R                  SS9$ )zsReturn the (lower, upper) int bounds of a decompression parameter.

Both the lower and upper bounds are inclusive.
Frp   rr   r/   s    r)   ru   ÚDecompressionParameter.boundsâ   s   € ô
 ×%Ò% d§j¡j¸eÑDÐDr,   r7   N)
r8   r9   r:   r;   r<   rA   ÚZSTD_d_windowLogMaxÚwindow_log_maxru   r>   r7   r,   r)   r
   r
   Ý   s   † Ù#à×.Ñ.€NõEr,   r
   c                   óð   • \ rS rSrSr\R                  r\R                  r	\R                  r\R                  r\R                  r\R                   r\R$                  r\R(                  r\R,                  rSrg)r   éê   zÆCompression strategies, listed from fastest to strongest.

Note that new strategies might be added in the future.
Only the order (from fast to strong) is guaranteed,
the numeric value might change.
r7   N)r8   r9   r:   r;   r<   rA   Ú	ZSTD_fastÚfastÚ
ZSTD_dfastÚdfastÚZSTD_greedyÚgreedyÚ	ZSTD_lazyÚlazyÚ
ZSTD_lazy2Úlazy2ÚZSTD_btlazy2Úbtlazy2Ú
ZSTD_btoptÚbtoptÚZSTD_btultraÚbtultraÚZSTD_btultra2Úbtultra2r>   r7   r,   r)   r   r   ê   sh   † ñð �?‰?€DØ×Ñ€EØ×Ñ€FØ�?‰?€DØ×Ñ€EØ× Ñ €GØ×Ñ€EØ× Ñ €GØ×"Ñ"ƒHr,   r   c                 óL   • U S:X  a  SSK Jn  U$ [        S[        < SU < 35      e)Nr   r   )r   zmodule z has no attribute )Úbackports.zstd._shutilr   r3   r8   )r4   r   s     r)   Ú__getattr__r¹     s-   € ØÐ Ó Ý:ØÐÜ
˜7¤8¡,Ð.@ÀÁÐIÓ
JÐJr,   )NNN)NN)%r<   ÚsysÚversion_infoÚRuntimeErrorÚversionÚ__all__Úbackports.zstd._zstdÚzstdrA   Úenumr   r   r   r   r   r   Úbackports.zstd._zstdfiler   r   r   ÚdivmodÚzstd_version_numberr   ÚZSTD_CLEVEL_DEFAULTr   r   r   r   r   r   r	   ÚIntEnumr   r
   r   Úset_parameter_typesr¹   r7   r,   r)   Ú<module>rÈ      s'  ðÙ Mã 
Ø�3×#Ñ#Õ- gÕ-Ù
Ð5°c·k±k°]ÐCÓ
DÐDð€÷: %Ð $Û ÷@÷ @ç <Ñ <ð6‘f˜U×6Ñ6¸#Ñ=¸sÓCð 6Ø×.Ñ.°Ñ4ñ6Ð à Hà�yÓ Ù
Ð0Ó
1Ð1à!×5Ñ5Ð Ø A÷>ñ >ò":ò$"ò*#"ôL@ô ô.D˜4Ÿ<™<ô DôD
E˜TŸ\™\ô 
Eô#ˆt�|‰|ô #ð( × Ò Ð.Ð0FÔ GóKr,   