Python binding for xxHash library providing fast non-cryptographic hash algorithms
Overall
score
80%
Evaluation — 80%
↑ 1.03xAgent success when using this tile
A utility that computes hash digests for large files by processing them in chunks.
Build a file chunk hasher that reads files incrementally and computes their hash digests without loading the entire file into memory. The hasher should support multiple output formats and allow users to verify file integrity by comparing hash values.
The system should provide a function that:
The function should return a dictionary/object containing:
hex: The hash as a hexadecimal stringbytes: The hash as raw bytesint: The hash as an integer value@generates
def compute_file_hash(file_path: str, chunk_size: int = 8192) -> dict:
"""
Computes hash digest for a file by reading it in chunks.
Args:
file_path: Path to the file to hash
chunk_size: Number of bytes to read per chunk (default: 8192)
Returns:
Dictionary containing 'hex', 'bytes', and 'int' representations of the hash
Raises:
FileNotFoundError: If the file does not exist
ValueError: If chunk_size is less than 1
"""
passProvides fast non-cryptographic hash computation with streaming interface support.
Install with Tessl CLI
npx tessl i tessl/pypi-xxhashdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10