def __init__(self, write_chunk_size, hash_functions=('crc32c', 'sha1', 'sha256', 's3_etag')):
        """ ChecksummingSink is initialized with a map from the name of the hash function to an object that
        represents the calculation function."""
        self._hashers = dict()
        for hasher in hash_functions:
            if hasher == 'crc32c':
                self._hashers['crc32c'] = CRC32C()
            elif hasher == 'sha1':
                self._hashers['sha1'] = hashlib.sha1()
            elif hasher == 'sha256':
                self._hashers['sha256'] = hashlib.sha256()
            elif hasher == 's3_etag':
                self._hashers['s3_etag'] = S3Etag(write_chunk_size)
def __init__ ( self , write_chunk_size , hash_functions = ( 'crc32c' , 'sha1' , 'sha256' , 's3_etag' ) ) : self . _hashers = dict ( ) for hasher in hash_functions : if hasher == 'crc32c' : self . _hashers [ 'crc32c' ] = CRC32C ( ) elif hasher == 'sha1' : self . _hashers [ 'sha1' ] = hashlib . sha1 ( ) elif hasher == 'sha256' : self . _hashers [ 'sha256' ] = hashlib . sha256 ( ) elif hasher == 's3_etag' : self . _hashers [ 's3_etag' ] = S3Etag ( write_chunk_size )
ChecksummingSink is initialized with a map from the name of the hash function to an object that
        represents the calculation function.