  THz spectroscopy is an emerging tool for detection of microorganisms and
harmful compounds in the food industry, the study of proteins in biomedicine
and the development of electron-beam X-ray sources for molecular imaging and
lithography. Recording of THz electric field evolution in single-shot is
crucially needed in terahertz spectroscopy of irreversible processes in such
applications as well as for data communication in the THz portion of the
spectrum where there is an abundance of untapped bandwidth. However, achieving
sub-picosecond resolution over a long time window has been an open problem for
electro-optic sampling -- the standard technique for recording terahertz
waveforms. We introduce a new conceptual framework for this open problem that
is inspired by time-stretch theory. The novel framework unveils a solution to
this 20 year-old problem leading to a dramatic enhancement of the achievable
temporal resolution. We validate this new technology in two applications.
First, we present single shot recordings of long free-propagating terahertz
transients with record time resolution. Second, we present recordings of
ultra-short relativistic electron bunches at the European X-ray Free Electron
Laser. These results show that electric signals may be now recorded with
terahertz bandwidth over arbitrarily long windows, thus enabling the
realization of "single-shot terahertz oscilloscopes" and single-shot
time-domain spectroscopy systems with an arbitrary time-bandwidth product.
