We derive apparent and absolute ultraviolet (UV) magnitudes, and luminosities in the infrared (IR) range of a large sample of low-redshift (0<z<1) compact star-forming galaxies (CSFGs) selected from the Data Release 12 of the Sloan Digital Sky Survey (SDSS). These data are used to constrain the extinction law in the UV for our galaxies and to compare the absorbed radiation in the UV range with the emission in the IR range. We find that the modelled far- and near-UV apparent magnitudes are in good agreement with the observed GALEX magnitudes. It is found that galaxies with low and high equivalent widths EW(Hbeta) of the Hbeta emission line require different reddening laws with steeper slopes for galaxies with higher EW(H$beta$). This implies an important role of the hard ionising radiation in shaping the dust grain size distribution. The IR emission in the range of 8-1000 mum is determined using existing data obtained by various infrared space telescopes. We find that the radiation energy absorbed in the UV range is nearly equal to the energy emitted in the IR range leaving very little room for hidden star formation in our galaxies. Using extinction-corrected Hbeta luminosities and modelled SEDs in the UV range we derive efficiencies of ionising photon production xi for the entire sample of CSFGs. It is found that $xi$ in CSFGs with high EW(Hbeta) are among the highest known for low- and high-redshift galaxies. If galaxies with similar properties existed at redshifts z=5-10, they could be considered as promising candidates for the reionisation of the Universe.