Hi QJB.
Sorry no-one has answered the question you originally answered. I'm sure you realise the answers given about volumetric efficiency have nothing to do with your question about thermodynamic efficiency of an engine.
The best way to answer you question about the thermodynamic efficiency of an engine increasing with a higher compression ratio, is to consider losses due to heat.
If you consider two cups of water - 1x 50 degrees celsius, 1x 100 degrees celsius... if you put them over a flame of 200 degrees for exactly one second, the cooler cup of water will absorb more heat (because the temperature split between the two is larger).
The same applies in an engine cylinder. When the ignition occurs, a lower compression ratio engine will have a cooler air/fuel charge in the cylinder - and so it will absorb more energy (which is wasted as exhaust gas heat).
A high compression ratio engine will ignite a hotter air/fuel charge which will absorb less heat. Less energy wasted as heat = more energy transferred to the crank.
Of course, it follows then that if you were to have two almost identical piston engines (one low/one high compression) burning exactly the same amount of fuel, the exhaust gases from the higher compression engine would be slightly cooler than the low compression engine.
Make sense?