Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pandas/compat/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pandas/compat/__pycache__/compressors.cpython-312.pyc

�

Mٜg�����dZddlmZddlmZddlmZ	ddlZdZ	ddl
Z
dZ				d
d�ZerGd	�d
ej�Z
erGd�de
j�Zyy#e	$rdZY�HwxYw#e	$rdZY�NwxYw)zC
Patched ``BZ2File`` and ``LZMAFile`` to handle pickle protocol 5.
�)�annotations)�PickleBuffer)�PY310NTFc���t|ttf�r|St|t�st|�}	|j	�S#t
$rt
|�jd�cYSwxYw)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)�bs �D/usr/local/lib/python3.12/site-packages/pandas/compat/compressors.py�flatten_bufferrs_���!�e�Y�'�(����a��&���O��*��u�u�w����*��!�}�$�$�S�)�)�*�s�A�#A+�*A+c�,��eZdZes
d�fd�Z�xZS�xZS)�BZ2Filec�4��t�|�t|��S�N��super�writer��selfr�	__class__s  �rrz
BZ2File.write7�����w�}�^�A�%6�7�7���return�int��__name__�
__module__�__qualname__rr�
__classcell__�rs@rrr4�����
8�
8�rrc�,��eZdZes
d�fd�Z�xZS�xZS)�LZMAFilec�4��t�|�t|��Srrrs  �rrzLZMAFile.writeFrrrr!r&s@rr)r)Cr'rr))rz-bytes | bytearray | memoryview | PickleBufferrzbytes | bytearray | memoryview)�__doc__�
__future__r�pickler�pandas.compat._constantsr�bz2�has_bz2�ImportError�lzma�has_lzmarrr)�rr�<module>r5s����#��*����G����H�
*�4�*�#�*�0�
8�#�+�+�
8��
8�4�=�=�
8���e���G������H��s"�A�A(�A%�$A%�(A2�1A2

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists