import codecs


def check_header(file, location, header):
    """Check if at the specified position The header of a hdf5 file is found"""
    file.seek(location)
    sig = file.read(8)
    return int(codecs.encode(sig, 'hex'), 16) == header