def METHOD_NAME(cls, stream):
    # The header starts with a 4-byte "magic" value
    if stream.read(4) != b"TZif":
        raise ValueError("Invalid TZif file: magic not found")
    _version = stream.read(1)
    if _version == b"\x00":
        version = 1
    else:
        version = int(_version)
    stream.read(15)
    args = (version,)
    # Slots are defined in the order that the bytes are arranged
    args = args + struct.unpack(">6l", stream.read(24))
    return cls(*args)