def read_u32(f):
    """Reads a four byte unsigned value from the file object f.
    """
    temp = f.read(4)
    if not temp:
        raise EOFError("EOF")

    return int.from_bytes(temp, byteorder='little', signed=False)