dug_seis.waveform_handler.utils module#

Utility functionality for the waveform handler class.

dug_seis.waveform_handler.utils.compute_sha256_hash_for_file(filename: Path, max_bytes: Optional[int] = None) str#

Compute the sha256 hash for a file.

Parameters:
  • filename – Path to the file.

  • max_bytes – Only use the first X bytes if specified. Useful when hashing really large files and when it is reasonable to expect the the first few MB uniquely identify the file.