  Ground-based observatories have been collecting 0.2 - 20 TeV gamma rays from
blazars for about twenty years. These gamma rays can experience absorption
along the line of sight due to interactions with the extragalactic background
light (EBL). In this paper, we show that the gamma-ray optical depth can be
reduced to the convolution product of an EBL kernel with the EBL intensity,
assuming a particular form for the EBL evolution. We extract the absorption
signal from the most extensive set of TeV spectra from blazars collected so far
and unveil a broad-band EBL spectrum from mid-ultraviolet to far infrared. This
spectrum is in good agreement with the accumulated emission of galaxies,
constraining unresolved populations of sources. We propose a data-driven
estimate of the Hubble constant based on the comparison of local and gamma-ray
measurements of the EBL. After setting stringent upper-limits on the redshift
of four TeV blazars, we investigate the 106 gamma-ray spectra in our sample and
find no significant evidence for anomalies. The intrinsic TeV spectra are not
harder than their GeV counterpart, and no spectral upturn is visible at the
highest optical depths. Finally, we investigate a modification of the
pair-creation threshold due to Lorentz invariance violation. A mild excess
prevents us from ruling out an effect at the Planck energy, and we constrain
for the first time the energy scale of the modification to values larger than
sixty percent of the Planck energy.
