
    *pj                        S r SSKJr  SSKJr  Sr\" \" S5      5      \" \" SS5      5      -   r\" S \ 5       5      r	S	r
S
rSrSr\" \" SS5      5      r\4SS jjrg)z"Stage 0: Binary content detection.    )annotations)DEFAULT_MAX_BYTESg{Gz?	          c              #  4   #    U  H  oS ;  d  M
  Uv   M     g7f))      N ).0bs     S/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/chardet/pipeline/binary.py	<genexpr>r      s     !U^?T!!^s   		g      ?g{Gz?@   r	         c                F   U SU n U (       d  gU R                  S[        5      n[        U 5      [        U5      -
  nU[        U 5      -  [        ::  a  gU R                  S[        5      n[        U 5      [        U5      -
  nU[        U 5      -  [        :  a  gU R                  [        5      U R                  [        5      -   n[        U 5      U-
  nUS:X  a  g[        U 5      [        U R                  S[        5      5      -
  nX-  [        :  a  gU[        U 5      -  [        :  $ )zReturn ``True`` if *data* appears to be binary (not text) content.

:param data: The raw byte data to examine.
:param max_bytes: Maximum number of bytes to scan.
:returns: ``True`` if the data is classified as binary.
NFTr   )	translate_BINARY_DELETElen_BINARY_THRESHOLD_BINARY_DELETE_NON_EBCDICcount_EBCDIC_SPACE
_EBCDIC_HT_HIGH_BYTES_DELETE_EBCDIC_MIN_HIGH_FRACTION_EBCDIC_MIN_SPACE_FRACTION)	data	max_bytescleanbinary_count
hard_clean
hard_countspace_count	non_space
high_counts	            r   	is_binaryr(   -   s     
DNN40Et9s5z)Lc$i#44 &?@JTS_,JCI 11**]+djj.DDKD	K'IA~TS6H!IJJJ 99T"%???    N)r   bytesr    intreturnbool)__doc__
__future__r   chardet._utilsr   r   r*   ranger   r   r   r   r   r   r   r(   r   r)   r   <module>r2      s    ( " ,   uT{#eE$,=&>>
 "!U^!UU  !  "  
 5u-.  -> @r)   