Using resistive compressible magnetohydrodynamics, we investigate the energy release and transfer by magnetic reconnection in finite (closed or periodic) systems. The emphasis is on the magnitude of energy released and transferred to plasma heating in configurations that range from highly compressible to incompressible, based on the magnitude of the background beta (ratio of plasma pressure over magnetic pressure) and of a guide field in two-dimensional reconnection. As expected, the system becomes more incompressible, and the role of compressional heating diminishes, with increasing beta or increasing guide field. Nevertheless, compressional heating may dominate over Joule heating for values of the guide field of 2 or 3 (in relation to the reconnecting magnetic field component) and beta of 5-10. This result stems from the strong localization of the dissipation near the reconnection site, which is modeled based on particle simulation results. Imposing uniform resistivity, corresponding to a Lundquist number of 10(3) to 10(4), leads to significantly larger Ohmic heating. Increasing incompressibility greatly reduces the magnetic flux transfer and the amount of energy released, from similar to 10% of the energy associated with the reconnecting field component, for zero guide field and low beta, to similar to 0.2% - 0.4% for large values of the guide field B-y0 > 5 or large beta. The results demonstrate the importance of taking into account plasma compressibility and localization of dissipation in investigations of heating by turbulent reconnection, possibly relevant for solar wind or coronal heating. (C) 2012 American Institute of Physics. [http://dx.doi.org/10.1063/1.4742314]