code: def compute_checksum(filename, max_length=2**20):
      
  
      fid = open(filename, 'rb') # Use binary for portability
      crcval = safe_crc(fid.read(max_length))
      fid.close()
  
      return crcval
docs: Compute the CRC32 checksum for specified file
  
      Optional parameter max_length sets the maximum number
      of bytes used to limit time used with large files.
      Default = 2**20 (1MB)