I had an epiphany the other day.

The answer to the problem is surely:

Heat given out = work done in adiabatic compression - work done in isothermal compression.

The work done in isothermal compression is lost to the outside unless some of it can be recovered.

I made an error in the calculation in post #79, the result should have been 5705 Joules.

Calculating the work done in adiabatic compression is slightly more complicated, but I found a good site:

https://phys.libretexts.org/Bookshel...r_an_Ideal_Gas
Going through this the work done in compressing the molar volume (24.47 L at 298K)) of perfect gas adiabatically at a volume ratio 10:1 is 9249 Joules.

So 9249 - 5705 = 3544 Joules of heat available to heat the building, not including the compressor waste heat. So it is only 38% efficient.

I suspect this could be improved by increasing the compression ratio beyond 10:1, because the work done in isothermal compression is proportional to natural log of compression ratio. But likely it can't be a heat pump unless the isothermal compression energy can be used or recovered with high efficiency, as you said.