This commit is contained in:
2026-02-08 12:28:54 +01:00
parent dbc60ee42b
commit e7dd89962e
10 changed files with 249 additions and 1 deletions

12
indexer/hasher.py Normal file
View File

@@ -0,0 +1,12 @@
from blake3 import blake3
def blake3_file(path, chunk_size=1024 * 1024):
"""
Spočítá BLAKE3 hash souboru po blocích (bez načtení do paměti)
"""
h = blake3()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(chunk_size), b""):
h.update(chunk)
return h.digest()