U
    
Ú²g  ã                   @   sH   d dl Z d dlZd dlmZ d dlmZ d dlmZ G dd„ deƒZdS )é    N)Úextend)Úvalue)ÚCommonChecksumc                   @   s&   e Zd ZdZdZd	dd„Zdd„ ZdS )
ÚChecksumzÈHashlib-alike helper for CRC32C operations.

    Args:
        initial_value (Optional[bytes]): the initial chunk of data from
            which the CRC32C checksum is computed.  Defaults to b''.
    )Ú_crcó    c                 C   s   t |ƒ| _d S )N)r   r   )ÚselfÚinitial_value© r
   ú6/tmp/pip-unpacked-wheel-1p3hnion/google_crc32c/cext.pyÚ__init__#   s    zChecksum.__init__c                 C   s   t | j|ƒ| _dS )z®Update the checksum with a new chunk of data.

        Args:
            chunk (Optional[bytes]): a chunk of data used to extend
                the CRC32C checksum.
        N)r   r   )r   Úchunkr
   r
   r   Úupdate&   s    zChecksum.updateN)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r
   r
   r
   r   r      s   
r   )	ÚstructZgoogle_crc32c.__config__Zgoogle_crc32cZgoogle_crc32c._crc32cr   r   Zgoogle_crc32c._checksumr   r   r
   r
   r
   r   Ú<module>   s
   