B
    ³è0\  ã               @   s¢   d dl mZmZ ddlmZ er2dd„ Zdd„ Zndd„ Zd	d„ Zdd
d„Zd dd„Zd!dd„Z	d"dd„Z
d#dd„Zd$dd„Zdd„ Zdd„ Zdd„ Zdd„ ZdS )%é    )Úunpack_fromÚpacké   )Úpy3c             C   s   | j tkr| S | d S )Nr   )Ú	__class__Úint)Úc© r	   ú*lib/python3.7/site-packages/PIL/_binary.pyÚi8   s    r   c             C   s   t | d@ fƒS )Néÿ   )Úbytes)Úir	   r	   r
   Úo8   s    r   c             C   s   t | ƒS )N)Úord)r   r	   r	   r
   r      s    c             C   s   t | d@ ƒS )Nr   )Úchr)r   r	   r	   r
   r      s    c             C   s   t d| |ƒd S )zœ
    Converts a 2-bytes (16 bits) string to an unsigned integer.

    c: string containing bytes to convert
    o: offset of bytes to convert in string
    z<Hr   )r   )r   Úor	   r	   r
   Úi16le    s    r   c             C   s   t d| |ƒd S )z™
    Converts a 2-bytes (16 bits) string to a signed integer.

    c: string containing bytes to convert
    o: offset of bytes to convert in string
    z<hr   )r   )r   r   r	   r	   r
   Úsi16le*   s    r   c             C   s   t d| |ƒd S )zœ
    Converts a 4-bytes (32 bits) string to an unsigned integer.

    c: string containing bytes to convert
    o: offset of bytes to convert in string
    z<Ir   )r   )r   r   r	   r	   r
   Úi32le4   s    r   c             C   s   t d| |ƒd S )z™
    Converts a 4-bytes (32 bits) string to a signed integer.

    c: string containing bytes to convert
    o: offset of bytes to convert in string
    z<ir   )r   )r   r   r	   r	   r
   Úsi32le>   s    r   c             C   s   t d| |ƒd S )Nz>Hr   )r   )r   r   r	   r	   r
   Úi16beH   s    r   c             C   s   t d| |ƒd S )Nz>Ir   )r   )r   r   r	   r	   r
   Úi32beL   s    r   c             C   s
   t d| ƒS )Nz<H)r   )r   r	   r	   r
   Úo16leQ   s    r   c             C   s
   t d| ƒS )Nz<I)r   )r   r	   r	   r
   Úo32leU   s    r   c             C   s
   t d| ƒS )Nz>H)r   )r   r	   r	   r
   Úo16beY   s    r   c             C   s
   t d| ƒS )Nz>I)r   )r   r	   r	   r
   Úo32be]   s    r   N)r   )r   )r   )r   )r   )r   )Zstructr   r   Z_utilr   r   r   r   r   r   r   r   r   r   r   r   r   r	   r	   r	   r
   Ú<module>   s    










