increase block size

This commit is contained in:
Vladimir Mandic 2023-01-15 09:42:34 -05:00 committed by GitHub
parent ebfdd7baeb
commit f0312565e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,9 +34,10 @@ def cache(subsection):
def calculate_sha256(filename):
hash_sha256 = hashlib.sha256()
blksize = 1024 * 1024
with open(filename, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
for chunk in iter(lambda: f.read(blksize), b""):
hash_sha256.update(chunk)
return hash_sha256.hexdigest()