A Dyson sphere is a spherical megastructure built around a star with the goal of capturing all of the energy output of the encased star and making that energy available to the controllers of the megastructure. Producing as much usable energy as possible is the idea.
If the encased star were artificially compressed or expanded, would the controllers of the Dyson sphere be able in increase the net energy output?
Note that the artificial compression or expansion would require energy, not only to initiate it, but to maintain it. The initial energy requirement may be ignored, but the energy used to maintain this effect would be siphoned off of the energy the Dyson sphere collects, hurting the net energy output.
Ignoring the details of how, you may assume the Dyson sphere is capable of absorbing 100% of the star's energy output, and is able to store, transmit, and use the energy it collects with 100% efficiency. The machinery used for the compression or expansion is built into the megastructure.