@classmethod
  def update_hash(cls, filelike, digest):
    block_size = digest.block_size * 1024
    for chunk in iter(lambda: filelike.read(block_size), b''):
      digest.update(chunk)
Update the digest of a single file in a memory-efficient manner.
dataset/ETHPy150Open pantsbuild/pex/pex/util.py/CacheHelper.update_hash