
    d<                        d Z ddlmZ ddlZddlmZ ddlmZ 	 ddlZdZ	n# e
$ r dZ	Y nw xY wddZ G d dej                  Ze	r G d dej                  ZdS dS )zC
Patched ``BZ2File`` and ``LZMAFile`` to handle pickle protocol 5.
    )annotationsN)PickleBuffer)PY310TFb-bytes | bytearray | memoryview | PickleBufferreturnbytes | bytearray | memoryviewc                   t          | t          t          f          r| S t          | t                    st          |           } 	 |                                 S # t
          $ r% t          |                               d          cY S w xY w)z
    Return some 1-D `uint8` typed buffer.

    Coerces anything that does not match that description to one that does
    without copying if possible (otherwise will copy).
    A)
isinstancebytes	bytearrayr   rawBufferError
memoryviewtobytes)r   s    U/var/www/html/t/fyr/venv311/lib/python3.11/site-packages/pandas/compat/compressors.pyflatten_bufferr      s     !eY'(( a&& OO*uuww * * *!}}$$S)))))*s   A ,BBc                  ,     e Zd Zes
d fdZ xZS  xZS )BZ2Filer   intc                `    t                                          t          |                    S Nsuperwriter   selfr   	__class__s     r   r   zBZ2File.write/   s#     77==!2!2333    r   r   __name__
__module____qualname__r   r   __classcell__r   s   @r   r   r   ,   sY         	4	4 	4 	4 	4 	4 	4 	4 	4 	4 	4	4 	4 	4 	4r    r   c                  ,     e Zd Zes
d fdZ xZS  xZS )LZMAFiler   r   c                `    t                                          t          |                    S r   r   r   s     r   r   zLZMAFile.write>   s#     ww}}^A%6%6777r    r!   r"   r'   s   @r   r)   r)   ;   sY         		88 8 8 8 8 8 8 8 8 8		8 		8 		8 		8r    r)   )r   r   r   r	   )__doc__
__future__r   bz2pickler   pandas.compat._constantsr   lzmahas_lzmaImportErrorr   r   r)    r    r   <module>r4      s    # " " " " " 



       * * * * * *KKKHH   HHH* * * *0
4 
4 
4 
4 
4ck 
4 
4 
4  8
8 
8 
8 
8 
84= 
8 
8 
8 
8 
88 8s   ! ++